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

Commit 559c72fd authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "AudioService: fix mute over CEC" into qt-dev

am: affa1ef7

Change-Id: I3d45053d60be8def3efa873449b1a138338c62d2
parents 6804e5b9 affa1ef7
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 &&