Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +19 −17 Original line number Diff line number Diff line Loading @@ -3003,6 +3003,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { UserHandle.CURRENT_OR_SELF); } return -1; } else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) { if (mUseTvRouting) { // On TVs volume keys never go to the foreground app. dispatchDirectAudioEvent(event); return -1; } } else if (KeyEvent.isMetaKey(keyCode)) { if (down) { mPendingMetaAction = true; Loading Loading @@ -5084,10 +5092,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_MUTE: { if (mUseTvRouting) { // On TVs volume keys never go to the foreground app result &= ~ACTION_PASS_TO_USER; } if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { if (down) { if (interactive && !mScreenshotChordVolumeDownKeyTriggered Loading Loading @@ -5147,11 +5151,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { break; } } if ((result & ACTION_PASS_TO_USER) == 0) { } if (mUseTvRouting) { dispatchDirectAudioEvent(event); } else { // On TVs, defer special key handlings to // {@link interceptKeyBeforeDispatching()}. result |= ACTION_PASS_TO_USER; } else if ((result & ACTION_PASS_TO_USER) == 0) { // If we aren't passing to the user and no one else // handled it send it to the session manager to // figure out. Loading @@ -5160,9 +5165,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { } break; } } break; } case KeyEvent.KEYCODE_ENDCALL: { result &= ~ACTION_PASS_TO_USER; Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +19 −17 Original line number Diff line number Diff line Loading @@ -3003,6 +3003,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { UserHandle.CURRENT_OR_SELF); } return -1; } else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) { if (mUseTvRouting) { // On TVs volume keys never go to the foreground app. dispatchDirectAudioEvent(event); return -1; } } else if (KeyEvent.isMetaKey(keyCode)) { if (down) { mPendingMetaAction = true; Loading Loading @@ -5084,10 +5092,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_MUTE: { if (mUseTvRouting) { // On TVs volume keys never go to the foreground app result &= ~ACTION_PASS_TO_USER; } if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { if (down) { if (interactive && !mScreenshotChordVolumeDownKeyTriggered Loading Loading @@ -5147,11 +5151,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { break; } } if ((result & ACTION_PASS_TO_USER) == 0) { } if (mUseTvRouting) { dispatchDirectAudioEvent(event); } else { // On TVs, defer special key handlings to // {@link interceptKeyBeforeDispatching()}. result |= ACTION_PASS_TO_USER; } else if ((result & ACTION_PASS_TO_USER) == 0) { // If we aren't passing to the user and no one else // handled it send it to the session manager to // figure out. Loading @@ -5160,9 +5165,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { } break; } } break; } case KeyEvent.KEYCODE_ENDCALL: { result &= ~ACTION_PASS_TO_USER; Loading