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

Commit d83449d2 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Option to hide IME switcher (2/2)" into ics

parents 1f49af62 8b014514
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line 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";
        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
         * Whether to use a separate delay for "slide to unlock" and security
         * lock
         * lock
+10 −2
Original line number Original line Diff line number Diff line
@@ -371,6 +371,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                    Settings.Secure.ENABLED_INPUT_METHODS), false, this);
                    Settings.Secure.ENABLED_INPUT_METHODS), false, this);
            resolver.registerContentObserver(Settings.Secure.getUriFor(
            resolver.registerContentObserver(Settings.Secure.getUriFor(
                    Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE), false, this);
                    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) {
        @Override public void onChange(boolean selfChange) {
@@ -635,8 +642,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                mStatusBar = statusBar;
                mStatusBar = statusBar;
                statusBar.setIconVisibility("ime", false);
                statusBar.setIconVisibility("ime", false);
                updateImeWindowStatusLocked();
                updateImeWindowStatusLocked();
                mShowOngoingImeSwitcherForPhones = mRes.getBoolean(
                        com.android.internal.R.bool.show_ongoing_ime_switcher);
                try {
                try {
                    startInputInnerLocked();
                    startInputInnerLocked();
                } catch (RuntimeException e) {
                } catch (RuntimeException e) {
@@ -1297,6 +1302,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
            mCurMethodId = null;
            mCurMethodId = null;
            unbindCurrentMethodLocked(true);
            unbindCurrentMethodLocked(true);
        }
        }

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


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