From 946702c3b8b86910ab8bd28ab734156b798e172e Mon Sep 17 00:00:00 2001 From: LiZhihong Date: Tue, 9 Aug 2022 18:38:52 +0800 Subject: [PATCH] Do not intercept LANGUAGE_SWITCH in the framework layer Currently, the LANGUAGE_SWITCH key code will be used to switch the keyboard layout in PhoneWindowManager; however, this prevents IMEs like GBoard from switching the language, which is the intended behavior. Test: manual Bug: 240865722 Signed-off-by: LiZhihong Change-Id: If5fcf65522a0a08f89e5594b6fc9576c2a77d0cb --- .../core/java/com/android/server/policy/PhoneWindowManager.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index d8e7fbe8b2962..69282e5a0238d 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -2944,8 +2944,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { if ((metaState & KeyEvent.META_META_MASK) == 0) { return key_not_consumed; } - // Share the same behavior with KEYCODE_LANGUAGE_SWITCH. - case KeyEvent.KEYCODE_LANGUAGE_SWITCH: if (down && repeatCount == 0) { int direction = (metaState & KeyEvent.META_SHIFT_MASK) != 0 ? -1 : 1; mWindowManagerFuncs.switchKeyboardLayout(event.getDeviceId(), direction);