Always remove starting window in performShow
When going to homescreen and then opening apps quickly again, the surface was not yet fully destroyed so we never triggered the codepath to remove the starting window in that case, so it was lingering around forever. Test: Open app, press home, reopen app immidiately again, make sure snapshot starting window is removed. Bug: 31339431 Change-Id: I946e681e7dc222e3dedfd3edacb8f37aee4a198b
This commit is contained in:
@@ -3715,6 +3715,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
|
||||
logPerformShow("performShow on ");
|
||||
|
||||
final int drawState = mWinAnimator.mDrawState;
|
||||
if ((drawState == HAS_DRAWN || drawState == READY_TO_SHOW)
|
||||
&& mAttrs.type != TYPE_APPLICATION_STARTING && mAppToken != null) {
|
||||
mAppToken.onFirstWindowDrawn(this, mWinAnimator);
|
||||
}
|
||||
|
||||
if (mWinAnimator.mDrawState != READY_TO_SHOW || !isReadyForDisplay()) {
|
||||
return false;
|
||||
}
|
||||
@@ -3749,10 +3755,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
}
|
||||
}
|
||||
|
||||
if (mAttrs.type != TYPE_APPLICATION_STARTING && mAppToken != null) {
|
||||
mAppToken.onFirstWindowDrawn(this, mWinAnimator);
|
||||
}
|
||||
|
||||
if (mAttrs.type == TYPE_INPUT_METHOD) {
|
||||
getDisplayContent().mDividerControllerLocked.resetImeHideRequested();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user