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

Commit 86e2377a authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove an unused field IMMS#mShortcutInputMethodsAndSubtypes

Since it was originally introduced [1],
IMMS#mShortcutInputMethodsAndSubtypes had been updated only from
IMMS#addShortcutInputMethodAndSubtypes(), which soon became an unused
method [2] then was removed [3].

As a result, IMMS#mShortcutInputMethodsAndSubtypes is now guaranteed
to be always empty.  Hence it can be safely removed.

This is a mechanical code clean up.  There should be no behavior
change.

 [1]: Ibd0f7ef5101013569c303820a3adc9038a97356d
      4e4569da
 [2]: Ib45ca20560c96faa6e2798242f3d1c3fe5156457
      3da92236
 [3]: I3bd814c8b5892b4ef28d6d5622014463df8f1c2b
      59bc6e03

Bug: 120709962
Test: compile
Change-Id: I46becaff97e1e041c6de52eb782c40d34932c113
parent 2232e861
Loading
Loading
Loading
Loading
+7 −21
Original line number Diff line number Diff line
@@ -553,10 +553,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
     */
    private InputMethodSubtype mCurrentSubtype;

    // This list contains the pairs of InputMethodInfo and InputMethodSubtype.
    private final ArrayMap<InputMethodInfo, ArrayList<InputMethodSubtype>>
            mShortcutInputMethodsAndSubtypes = new ArrayMap<>();

    // Was the keyguard locked when this client became current?
    private boolean mCurClientInKeyguard;

@@ -2535,7 +2531,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                Slog.w(TAG, "Unknown input method from prefs: " + id, e);
                resetCurrentMethodAndClient(UnbindReason.SWITCH_IME_FAILED);
            }
            mShortcutInputMethodsAndSubtypes.clear();
        } else {
            // There is no longer an input method set, so stop any current one.
            resetCurrentMethodAndClient(UnbindReason.NO_IME);
@@ -4228,7 +4223,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    public List getShortcutInputMethodsAndSubtypes() {
        synchronized (mMethodMap) {
            ArrayList<Object> ret = new ArrayList<>();
            if (mShortcutInputMethodsAndSubtypes.size() == 0) {
            // If there are no selected shortcut subtypes, the framework will try to find
            // the most applicable subtype from all subtypes whose mode is
            // SUBTYPE_MODE_VOICE. This is an exceptional case, so we will hardcode the mode.
@@ -4241,14 +4235,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
            }
            return ret;
        }
            for (InputMethodInfo imi: mShortcutInputMethodsAndSubtypes.keySet()) {
                ret.add(imi);
                for (InputMethodSubtype subtype: mShortcutInputMethodsAndSubtypes.get(imi)) {
                    ret.add(subtype);
                }
            }
            return ret;
        }
    }

    @Override