show WSA when ready when using shell transitions

Legacy transitions seems to show WSA a frame after the
drawing finishes (updateAllDrawn runs after commitFinishDrawingLocked
and the condition canShowWindows() depends on allDrawn).

Shell transitions doesn't use allDrawn and instead uses
BLASTSyncEngine. So, don't delay WSA otherwise the WSA show won't
be on the sync transaction.

Bug: 230495892
Test: atest AnimationEdgeExtensionTests
Change-Id: I8b7596085e57b2e3ddaea05e6893b7099cd49e3a
This commit is contained in:
Evan Rosky
2022-05-11 14:14:36 -07:00
parent e269e8e7ca
commit 4c15784756

View File

@@ -4468,8 +4468,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
* color mode set to avoid jank in the middle of the transition.
*/
boolean canShowWindows() {
return allDrawn && !(isAnimating(PARENTS, ANIMATION_TYPE_APP_TRANSITION)
&& hasNonDefaultColorWindow());
final boolean drawn = mTransitionController.isShellTransitionsEnabled()
? mSyncState != SYNC_STATE_WAITING_FOR_DRAW : allDrawn;
final boolean animating = mTransitionController.isShellTransitionsEnabled()
? mTransitionController.inTransition(this)
: isAnimating(PARENTS, ANIMATION_TYPE_APP_TRANSITION);
return drawn && !(animating && hasNonDefaultColorWindow());
}
/**