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

Commit 241fc788 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Simplify range check for audio_mode_t (continued)"

parents 86905f44 347966c8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -548,6 +548,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;