We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 540c35f commit 8f397cdCopy full SHA for 8f397cd
media/libmedia/AudioSystem.cpp
@@ -538,6 +538,7 @@ audio_policy_dev_state_t AudioSystem::getDeviceConnectionState(audio_devices_t d
538
539
status_t AudioSystem::setPhoneState(audio_mode_t state)
540
{
541
+ if (uint32_t(state) >= AUDIO_MODE_CNT) return BAD_VALUE;
542
const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
543
if (aps == 0) return PERMISSION_DENIED;
544
0 commit comments