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

Commit 68ef29b2 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Call IMM#startInputInner() after releasing the lock

While IMM#startInputInner() should not be called while the caller
already holds IMM#mH lock, it seems that there is a long standing
violation of such a rule for more than 10 years [1].

This CL finally addresses it.

The method calling order remains to be the same so hopefully the app
compat risk is low.

 [1]: I9189e6d2ac90aa8c621fdb44989728101e00329d
      31e4e149

Bug: 234882948
Test: presubmit
Change-Id: Ib6f5a356ce5574976baefbe89e82de183b691e91
parent c356266e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1128,10 +1128,13 @@ public final class InputMethodManager {
                        if (!checkFocusInternalLocked(mRestartOnNextWindowFocus, mCurRootView)) {
                            return;
                        }
                        mCurrentEditorInfo = null;
                        mCompletions = null;
                        mServedConnecting = true;
                    }
                    final int reason = active ? StartInputReason.ACTIVATED_BY_IMMS
                            : StartInputReason.DEACTIVATED_BY_IMMS;
                        startInputOnWindowFocusGainInternal(reason, null, 0, 0, 0);
                    }
                    startInputInner(reason, null, 0, 0, 0);
                    return;
                }
                case MSG_SET_INTERACTIVE: {