From 8939838d5d3ee8324d156ce60af4c7feacbb22a2 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Tue, 29 Mar 2016 11:37:04 -0700 Subject: IME switcher should not always require IME_VISIBLE. When one ore more physical keyboards are attached, we should not require InputMethodService.IME_VISIBLE to show the IME switcher because some IMEs such as LatinIME shows no software keyboard w/ physical keyboard. Bug: 26245853 Change-Id: I8aac9f5989ebaf544ace06a3ba0993b3a834869d --- services/core/java/com/android/server/InputMethodManagerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java index e04248303c20..77b3111fa98b 100644 --- a/services/core/java/com/android/server/InputMethodManagerService.java +++ b/services/core/java/com/android/server/InputMethodManagerService.java @@ -1715,8 +1715,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub // exists in the IME switcher dialog. Might be OK to remove this condition once // SHOW_IME_WITH_HARD_KEYBOARD settings finds a good place to live. return true; + } else if ((visibility & InputMethodService.IME_VISIBLE) == 0) { + return false; } - if ((visibility & InputMethodService.IME_VISIBLE) == 0) return false; List imis = mSettings.getEnabledInputMethodListLocked(); final int N = imis.size(); -- cgit v1.2.3-59-g8ed1b