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

Commit 6729921f authored by Vlad Popa's avatar Vlad Popa
Browse files

No IVolumeController updates for invalid stream type

Bug: 363148668
Flag: EXEMPT bugfix
Test: manual
Change-Id: I12e753bd1fc0180510834867c55a30ab72c418d7
parent 6459fc72
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5443,6 +5443,10 @@ public class AudioService extends IAudioService.Stub
    protected void sendVolumeUpdate(int streamType, int oldIndex, int index, int flags, int device)
    {
        streamType = sStreamVolumeAlias.get(streamType, /*valueIfKeyNotFound=*/-1);
        if (streamType == -1) {
            Slog.e(TAG, "Invalid stream type. No update to IVolumeController", new Exception());
            return;
        }
        if (streamType == AudioSystem.STREAM_MUSIC && isFullVolumeDevice(device)) {
            flags &= ~AudioManager.FLAG_SHOW_UI;