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

Commit 8b014514 authored by Roman Birg's avatar Roman Birg Committed by Rick C
Browse files

Option to hide IME switcher (2/2)

Change-Id: I210c1db65f8b5c41dcbcd559c0e7e0a53dd2df7f
parent cb844839
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2306,6 +2306,12 @@ public final class Settings {
         */
        public static final String STATUS_BAR_BRIGHTNESS_CONTROL = "status_bar_brightness_control";

        /**
         * Whether to show the IME switcher in the status bar
         * @hide
         */
        public static final String STATUS_BAR_IME_SWITCHER = "status_bar_ime_switcher";

        /**
         * Whether to use a separate delay for "slide to unlock" and security
         * lock
+10 −2
Original line number Diff line number Diff line
@@ -371,6 +371,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                    Settings.Secure.ENABLED_INPUT_METHODS), false, this);
            resolver.registerContentObserver(Settings.Secure.getUriFor(
                    Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE), false, this);
            resolver.registerContentObserver(Settings.Secure.getUriFor(
                    Settings.System.STATUS_BAR_IME_SWITCHER),
                    false, new ContentObserver(null) {
                        public void onChange(boolean selfChange) {
                            updateFromSettingsLocked();
                        }
                    });
        }

        @Override public void onChange(boolean selfChange) {
@@ -635,8 +642,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                mStatusBar = statusBar;
                statusBar.setIconVisibility("ime", false);
                updateImeWindowStatusLocked();
                mShowOngoingImeSwitcherForPhones = mRes.getBoolean(
                        com.android.internal.R.bool.show_ongoing_ime_switcher);
                try {
                    startInputInnerLocked();
                } catch (RuntimeException e) {
@@ -1297,6 +1302,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
            mCurMethodId = null;
            unbindCurrentMethodLocked(true);
        }

        mShowOngoingImeSwitcherForPhones = Settings.System.getInt(mContext.getContentResolver(),
                Settings.System.STATUS_BAR_IME_SWITCHER, 1) == 1;
    }

    /* package */ void setInputMethodLocked(String id, int subtypeId) {