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

Commit cb1b5cae authored by Srilakshmi Punuru's avatar Srilakshmi Punuru Committed by Steve Kondik
Browse files

InputMethodManagerService: Fix acore crash on boot up

At bootup, while starting the service, if the default Input Method is not set,
it is trying to disable the icon even before the statusbar variable and the input
method icon are initialized. Hence, initializing them before building the input method list.

Change-Id: Ibde2ca3bd379d6620d84b75662ffad1a95a24fc6
parent 63729e3b
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -469,6 +469,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        screenOnOffFilt.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
        screenOnOffFilt.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
        mContext.registerReceiver(new ScreenOnOffReceiver(), screenOnOffFilt);
        mContext.registerReceiver(new ScreenOnOffReceiver(), screenOnOffFilt);


        mStatusBar = statusBar;
        mInputMethodData = IconData.makeIcon("ime", null, 0, 0, 0);
        mInputMethodIcon = statusBar.addIcon(mInputMethodData, null);
        statusBar.setIconVisibility(mInputMethodIcon, false);

        buildInputMethodListLocked(mMethodList, mMethodMap);
        buildInputMethodListLocked(mMethodList, mMethodMap);


        final String enabledStr = Settings.Secure.getString(
        final String enabledStr = Settings.Secure.getString(
@@ -510,11 +515,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
            }
            }
        }
        }


        mStatusBar = statusBar;
        mInputMethodData = IconData.makeIcon("ime", null, 0, 0, 0);
        mInputMethodIcon = statusBar.addIcon(mInputMethodData, null);
        statusBar.setIconVisibility(mInputMethodIcon, false);

        mSettingsObserver = new SettingsObserver(mHandler);
        mSettingsObserver = new SettingsObserver(mHandler);
        updateFromSettingsLocked();
        updateFromSettingsLocked();
    }
    }