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
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;
}
}
}
- if (mAttrs.type != TYPE_APPLICATION_STARTING && mAppToken != null) {
- mAppToken.onFirstWindowDrawn(this, mWinAnimator);
- }
-
if (mAttrs.type == TYPE_INPUT_METHOD) {
getDisplayContent().mDividerControllerLocked.resetImeHideRequested();
}