diff options
author | Eric Laurent <elaurent@google.com> | 2011-08-02 17:41:11 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-08-12 17:43:35 -0700 |
commit | 497b3fe7257d5bbee7762455c6988915bde21601 (patch) | |
tree | 53eb1f81d44e07906216667506b7c63b03f076bb /services/audioflinger | |
parent | 7b53848d14dc041f6bc64c6fa5c63b93a87010aa (diff) | |
download | frameworks_base-497b3fe7257d5bbee7762455c6988915bde21601.zip frameworks_base-497b3fe7257d5bbee7762455c6988915bde21601.tar.gz frameworks_base-497b3fe7257d5bbee7762455c6988915bde21601.tar.bz2 |
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/audioflinger')
-rw-r--r-- | services/audioflinger/AudioPolicyService.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index d747b5ad..8da5ca1 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; } |