From 0a5ba428b723828a9bb27ab7c8fec0c0c048a2a7 Mon Sep 17 00:00:00 2001 From: Sean Stout Date: Wed, 17 Mar 2021 14:23:14 -0700 Subject: [PATCH] Allow IME hiding on displays without system decorations This CL allows for displays without system decorations to hide the IME if WM#setDisplayImePolicy(DISPLAY_IME_POLICY_HIDE) is called. Fixes: 174523386 Test: atest CtsWindowManagerDeviceTestCases:MultiDisplaySystemDecorationTests#testDisplayPolicyImeHideImeNoSystemDecorations Change-Id: I612800e6787edbff8abe536d33a20146264893d1 --- .../android/server/inputmethod/InputMethodManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index e9c3ec392d383..decf67dfc1bd6 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -3202,7 +3202,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub boolean showCurrentInputLocked(IBinder windowToken, int flags, ResultReceiver resultReceiver, @SoftInputShowHideReason int reason) { mShowRequested = true; - if (mAccessibilityRequestingNoSoftKeyboard) { + if (mAccessibilityRequestingNoSoftKeyboard || mImeHiddenByDisplayPolicy) { return false; }