Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f397cdd authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Simplify range check for audio_mode_t (continued)

Missed one place in earlier CL of same name

Change-Id: I0dd25364d0b8d5d731c02d352f139a0c8d4df1a8
parent 540c35f7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -538,6 +538,7 @@ audio_policy_dev_state_t AudioSystem::getDeviceConnectionState(audio_devices_t d

status_t AudioSystem::setPhoneState(audio_mode_t state)
{
    if (uint32_t(state) >= AUDIO_MODE_CNT) return BAD_VALUE;
    const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
    if (aps == 0) return PERMISSION_DENIED;