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

Commit 4d1f9ec3 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Dispatch volume key event when mHandleVolumeKeysInWM is set

When mHandleVolumeKeysInWM is set, interceptKeyBeforeQueueing should not
swallow the volume key events when ringer is running.

Instead, in Automotive case, all volume key events would be dispatched
to CarAudioService and it's up to CarAudioService how to handle and
route the events.

Bug: 80155078
Test: manual test on Mojave carkit
Change-Id: Ia5e247ffcd5b30672e260a12cb95827d05232631
parent a828705f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -6157,7 +6157,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    sendSystemKeyToStatusBarAsync(event.getKeyCode());

                    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 an incoming call is ringing, either VOLUME key means
                            // "silence ringer".  We handle these keys here, rather than