We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6808516 + 8f397cd commit adf1083Copy full SHA for adf1083
media/libmedia/AudioSystem.cpp
@@ -548,6 +548,7 @@ audio_policy_dev_state_t AudioSystem::getDeviceConnectionState(audio_devices_t d
548
549
status_t AudioSystem::setPhoneState(audio_mode_t state)
550
{
551
+ if (uint32_t(state) >= AUDIO_MODE_CNT) return BAD_VALUE;
552
const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
553
if (aps == 0) return PERMISSION_DENIED;
554
0 commit comments