Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cf1bcd1 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #2325621: Runtime restart after launching Android keyboard setting.

Again.

Change-Id: Icc36029767fbfea19e474aa0731e8271da1329db
parent aa773543
Loading
Loading
Loading
Loading
+56 −56
Original line number Diff line number Diff line
@@ -1463,8 +1463,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    void showInputMethodMenu() {
        if (DEBUG) Slog.v(TAG, "Show switching menu");

        hideInputMethodMenu();

        final Context context = mContext;

        final PackageManager pm = context.getPackageManager();
@@ -1479,20 +1477,23 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
            return;
        }
        
        synchronized (mMethodMap) {
            hideInputMethodMenuLocked();

            int N = immis.size();
    
            mItems = new CharSequence[N];
            mIms = new InputMethodInfo[N];
    
            int j = 0;
            for (int i = 0; i < N; ++i) {
                InputMethodInfo property = immis.get(i);
                if (property == null) {
                i--;
                N--;
                    continue;
                }
            mItems[i] = property.loadLabel(pm);
            mIms[i] = property;
                mItems[j] = property.loadLabel(pm);
                mIms[j] = property;
                j++;
            }
    
            int checkedItem = 0;
@@ -1539,7 +1540,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                        }
                    });

        synchronized (mMethodMap) {
            mSwitchingDialog = mDialogBuilder.create();
            mSwitchingDialog.getWindow().setType(
                    WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG);