Extract removing current window token
Bug: 205676419 Test: make Change-Id: Ie6ba42d3b2ca86e2f0270bf8190632ec09d5b1da
This commit is contained in:
@@ -2687,25 +2687,30 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
}
|
||||
|
||||
if (getCurToken() != null) {
|
||||
if (DEBUG) {
|
||||
Slog.v(TAG, "Removing window token: " + getCurToken() + " for display: "
|
||||
+ mCurTokenDisplayId);
|
||||
}
|
||||
mWindowManagerInternal.removeWindowToken(getCurToken(), false /* removeWindows */,
|
||||
false /* animateExit */, mCurTokenDisplayId);
|
||||
// Set IME window status as invisible when unbind current method.
|
||||
mImeWindowVis = 0;
|
||||
mBackDisposition = InputMethodService.BACK_DISPOSITION_DEFAULT;
|
||||
updateSystemUiLocked(mImeWindowVis, mBackDisposition);
|
||||
setCurToken(null);
|
||||
mCurTokenDisplayId = INVALID_DISPLAY;
|
||||
mCurHostInputToken = null;
|
||||
removeCurrentTokenLocked();
|
||||
}
|
||||
|
||||
setCurId(null);
|
||||
clearCurMethodLocked();
|
||||
}
|
||||
|
||||
@GuardedBy("mMethodMap")
|
||||
void removeCurrentTokenLocked() {
|
||||
IBinder token = getCurToken();
|
||||
if (DEBUG) {
|
||||
Slog.v(TAG, "Removing window token: " + token + " for display: " + mCurTokenDisplayId);
|
||||
}
|
||||
mWindowManagerInternal.removeWindowToken(token, false /* removeWindows */,
|
||||
false /* animateExit */, mCurTokenDisplayId);
|
||||
// Set IME window status as invisible when unbind current method.
|
||||
mImeWindowVis = 0;
|
||||
mBackDisposition = InputMethodService.BACK_DISPOSITION_DEFAULT;
|
||||
updateSystemUiLocked(mImeWindowVis, mBackDisposition);
|
||||
setCurToken(null);
|
||||
mCurTokenDisplayId = INVALID_DISPLAY;
|
||||
mCurHostInputToken = null;
|
||||
}
|
||||
|
||||
@GuardedBy("mMethodMap")
|
||||
void resetCurrentMethodAndClientLocked(@UnbindReason int unbindClientReason) {
|
||||
setSelectedMethodId(null);
|
||||
|
||||
Reference in New Issue
Block a user