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

Commit fe35e741 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Remove show_ongoing_ime_switcher resource

In [1] we introduced a notification to enable switching across multiple IMEs,
together with the show_ongoing_ime_switcher resource, which was always
set to true. Later in [2] we fully removed the notification, but left
the resource and its usages. This can still block showing the IME Switcher
button in the navigation bar, if the resource is overridden to false.
However, that is not the intended usage of the resource. As this is
internal only, and otherwise always true, we can go ahead and remove it.

  [1]: I2b9e955003c1f6703978824c947d5f322a039714
  [2]: I3b09d2b05ba9bde686b360b9f720b5d4258551c3

Flag: EXEMPT cleanup
Bug: 409002606
Test: n/a
Change-Id: Idd93cf97590d3b6fbdf4cf3456bf137ca546af16
parent 626cf178
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
-->

<resources>
    <bool name="show_ongoing_ime_switcher">true</bool>
    <bool name="kg_share_status_area">false</bool>
    <bool name="kg_sim_puk_account_full_screen">false</bool>
    <!-- No camera for you, tablet user -->
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
    <bool name="action_bar_embed_tabs">true</bool>
    <bool name="split_action_bar_is_narrow">true</bool>
    <bool name="preferences_prefer_dual_pane">false</bool>
    <bool name="show_ongoing_ime_switcher">true</bool>
    <bool name="action_bar_expanded_action_views_exclusive">true</bool>
    <!-- Whether or not to use the drawable/lockscreen_notselected and
         drawable/lockscreen_selected instead of the generic dots when displaying
+0 −1
Original line number Diff line number Diff line
@@ -2084,7 +2084,6 @@
  <java-symbol type="bool" name="config_supportLongPressPowerWhenNonInteractive" />
  <java-symbol type="bool" name="config_supportShortPressPowerWhenDefaultDisplayOn" />
  <java-symbol type="bool" name="config_wimaxEnabled" />
  <java-symbol type="bool" name="show_ongoing_ime_switcher" />
  <java-symbol type="color" name="config_defaultNotificationColor" />
  <java-symbol type="color" name="decor_view_status_guard" />
  <java-symbol type="color" name="decor_view_status_guard_light" />
+4 −10
Original line number Diff line number Diff line
@@ -462,8 +462,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.

    @Nullable
    private StatusBarManagerInternal mStatusBarManagerInternal;
    @SharedByAllUsersField
    private boolean mShowOngoingImeSwitcherForPhones;
    @GuardedBy("ImfLock.class")
    @MultiUserUnawareField
    private final HandwritingModeController mHwController;
@@ -1269,8 +1267,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.

            mSlotIme = mContext.getString(com.android.internal.R.string.status_bar_ime);

            mShowOngoingImeSwitcherForPhones = false;

            ProtoLog.init(ImeProtoLogGroup.values());

            mCurrentImeUserId = mActivityManagerInternal.getCurrentUserId();
@@ -1490,9 +1486,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                final var bindingController = getInputMethodBindingController(currentImeUserId);
                updateSystemUiLocked(bindingController.getImeWindowVis(),
                        bindingController.getBackDisposition(), currentImeUserId);
                mShowOngoingImeSwitcherForPhones = mRes.getBoolean(
                        com.android.internal.R.bool.show_ongoing_ime_switcher);
                if (mShowOngoingImeSwitcherForPhones) {
                if (!Flags.imeSwitcherRevamp()) {
                    mWindowManagerInternal.setOnHardKeyboardStatusChangeListener(available -> {
                        mHandler.obtainMessage(MSG_HARD_KEYBOARD_SWITCH_CHANGED,
                                available ? 1 : 0, 0 /* unused */).sendToTarget();
@@ -2717,7 +2711,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
    @GuardedBy("ImfLock.class")
    private boolean shouldShowImeSwitcherLocked(@ImeWindowVisibility int visibility,
            @UserIdInt int userId) {
        if (!mShowOngoingImeSwitcherForPhones) return false;
        // When the IME switcher dialog is shown, the IME switcher button should be hidden.
        // TODO(b/305849394): Make mMenuController multi-user aware.
        final boolean switcherMenuShowing = Flags.imeSwitcherRevamp()
@@ -5047,9 +5040,10 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.

            // --------------------------------------------------------------
            case MSG_HARD_KEYBOARD_SWITCH_CHANGED:
                if (!Flags.imeSwitcherRevamp()) {
                    mMenuController.handleHardKeyboardStatusChange(msg.arg1 == 1);
                if (Flags.imeSwitcherRevamp()) {
                    return true;
                }
                mMenuController.handleHardKeyboardStatusChange(msg.arg1 == 1);
                synchronized (ImfLock.class) {
                    sendOnNavButtonFlagsChangedToAllImesLocked();
                }