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
This commit is contained in:
@@ -801,25 +801,21 @@ public final class InputMethodManager {
|
||||
mServedInputConnectionWrapper = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
Reference in New Issue
Block a user