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

Commit a03966b2 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "AudioService: fix mute over CEC" into qt-dev am: affa1ef7 am: 559c72fd"

parents f6c7fce4 d7a1ae8b
Loading
Loading
Loading
Loading
+22 −8
Original line number Diff line number Diff line
@@ -1825,8 +1825,21 @@ public class AudioService extends IAudioService.Stub
                            && streamTypeAlias == AudioSystem.STREAM_MUSIC
                            // vol change on a full volume device
                            && ((device & mFullVolumeDevices) != 0)) {
                        int keyCode = (direction == -1) ? KeyEvent.KEYCODE_VOLUME_DOWN :
                                KeyEvent.KEYCODE_VOLUME_UP;
                        int keyCode = KeyEvent.KEYCODE_UNKNOWN;
                        switch (direction) {
                            case AudioManager.ADJUST_RAISE:
                                keyCode = KeyEvent.KEYCODE_VOLUME_UP;
                                break;
                            case AudioManager.ADJUST_LOWER:
                                keyCode = KeyEvent.KEYCODE_VOLUME_DOWN;
                                break;
                            case AudioManager.ADJUST_TOGGLE_MUTE:
                                keyCode = KeyEvent.KEYCODE_VOLUME_MUTE;
                                break;
                            default:
                                break;
                        }
                        if (keyCode != KeyEvent.KEYCODE_UNKNOWN) {
                            final long ident = Binder.clearCallingIdentity();
                            try {
                                mHdmiPlaybackClient.sendKeyEvent(keyCode, true);
@@ -1835,6 +1848,7 @@ public class AudioService extends IAudioService.Stub
                                Binder.restoreCallingIdentity(ident);
                            }
                        }
                    }

                    if (mHdmiAudioSystemClient != null &&
                            mHdmiSystemAudioSupported &&