summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-08-02 17:41:11 -0700
committerEric Laurent <elaurent@google.com>2011-08-12 17:43:35 -0700
commita5cc7cce9b8aee73b08f6532710e186c02fdd1c0 (patch)
treee23becde27c1878444b3569d55109b7306a36994 /services
parent0270b188aa3929cc512ec6869caba1d6b60cc08c (diff)
Issue 5081351: isWiredHeadsetOn() permission.
AudioManager.isWiredHeadsetOn() should not require permission MODIFY_AUDIO_SETTINGS. Remove permission checks on all getters in audio policy manager as permission enforcement is really usefull for setters. Also deprecate AudioManager.isWiredHeadsetOn() which name and implementation are deceptive. Change-Id: I38f8df7c26c0d417bf0e2b74e4c11c2d143f2ecd
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioPolicyService.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index d747b5ad..8da5ca14 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -182,9 +182,6 @@ audio_policy_dev_state_t AudioPolicyService::getDeviceConnectionState(
if (mpAudioPolicy == NULL) {
return AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE;
}
- if (!checkPermission()) {
- return AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE;
- }
return mpAudioPolicy->get_device_connection_state(mpAudioPolicy, device,
device_address);
}
@@ -250,9 +247,6 @@ audio_policy_forced_cfg_t AudioPolicyService::getForceUse(audio_policy_force_use
if (mpAudioPolicy == NULL) {
return AUDIO_POLICY_FORCE_NONE;
}
- if (!checkPermission()) {
- return AUDIO_POLICY_FORCE_NONE;
- }
if (usage < 0 || usage >= AUDIO_POLICY_FORCE_USE_CNT) {
return AUDIO_POLICY_FORCE_NONE;
}
@@ -434,9 +428,6 @@ status_t AudioPolicyService::getStreamVolumeIndex(audio_stream_type_t stream, in
if (mpAudioPolicy == NULL) {
return NO_INIT;
}
- if (!checkPermission()) {
- return PERMISSION_DENIED;
- }
if (stream < 0 || stream >= AUDIO_STREAM_CNT) {
return BAD_VALUE;
}