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

Commit 0f3a99d8 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Do not clear IMM#mCurRootView in IMM#finishInputLocked().

This is a follow up CL for I219394178e4172bc47864297f1418e677dba.

As explained in the commit message of I219394178e4172bc47864297f,
IMM#mCurRootView needs to be synchronized with the actual window
focus more precisely to fix Bug 20820914. Hence we should not
clear IMM#mCurRootView in IMM#finishInputLocked() anymore.
Ideally this CL should have been included in the previous CL.

Manually tested following scenarios.
- Repro steps in Bug 6413553.  Made sure that IMM#mCurRootView
  is cleared after switching back from the current application to
  the previous application with back key.
- Test application that calls WebView#showFindDialog(). Made sure
  that LatinIME works fine when switching text fields.  This is
  non-trivial because android.webkit.FindActionModeCallback is
  changed in the previous CL I219394178e4172bc47864297f1418e677db.
- Repro steps in Bug 21144633.  Made sure that we can enter
  recipient's name in the messaging app.

This CL depends on I219394178e4172bc47864297f1418e677dba25e5.

Bug: 20820914
Change-Id: Id6afc8fc64512225578c62557b96c7dc2e969adf
parent d6bd9da8
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -806,20 +806,16 @@ public final class InputMethodManager {
     * Disconnect any existing input connection, clearing the served view.
     */
    void finishInputLocked() {
        mCurRootView = null;
        mNextServedView = null;
        if (mServedView != null) {
            if (DEBUG) Log.v(TAG, "FINISH INPUT: " + mServedView);
            
            if (mCurrentTextBoxAttribute != null) {
                try {
                    mService.finishInput(mClient);
                } catch (RemoteException e) {
                }
            }
            
            notifyInputConnectionFinished();
            
            mServedView = null;
            mCompletions = null;
            mServedConnecting = false;