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

Commit 6de87296 authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Dispatch volume key event when mHandleVolumeKeysInWM is set" into pi-dev

parents 879d09f9 4d1f9ec3
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -6161,7 +6161,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    sendSystemKeyToStatusBarAsync(event.getKeyCode());
                    sendSystemKeyToStatusBarAsync(event.getKeyCode());


                    TelecomManager telecomManager = getTelecommService();
                    TelecomManager telecomManager = getTelecommService();
                    if (telecomManager != null) {
                    if (telecomManager != null && !mHandleVolumeKeysInWM) {
                        // When {@link #mHandleVolumeKeysInWM} is set, volume key events
                        // should be dispatched to WM.
                        if (telecomManager.isRinging()) {
                        if (telecomManager.isRinging()) {
                            // If an incoming call is ringing, either VOLUME key means
                            // If an incoming call is ringing, either VOLUME key means
                            // "silence ringer".  We handle these keys here, rather than
                            // "silence ringer".  We handle these keys here, rather than