diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 9d5d65d870624..b44207205d317 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -3824,19 +3824,15 @@ public class InputMethodManagerService extends IInputMethodManager.Stub if (DEBUG) Slog.v(TAG, "Current IME: " + lastInputMethodId); synchronized (mMethodMap) { - final HashMap> immis = - mSettings.getExplicitlyOrImplicitlyEnabledInputMethodsAndSubtypeListLocked( - mContext); - if (immis == null || immis.size() == 0) { + final List imList = + mSwitchingController.getSortedInputMethodAndSubtypeListLocked( + showAuxSubtypes, isScreenLocked); + if (imList.isEmpty()) { return; } hideInputMethodMenuLocked(); - final List imList = - mSwitchingController.getSortedInputMethodAndSubtypeListLocked( - showAuxSubtypes, isScreenLocked); - if (lastInputMethodSubtypeId == NOT_A_SUBTYPE_ID) { final InputMethodSubtype currentSubtype = getCurrentInputMethodSubtypeLocked(); if (currentSubtype != null) {