Merge "[Shell Transition] Defer remove splash screen window when it is inTransition."
This commit is contained in:
committed by
Android (Google) Code Review
commit
3244bf364d
@@ -2755,6 +2755,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
}
|
||||
|
||||
final StartingSurfaceController.StartingSurface surface;
|
||||
final WindowState startingWindow = mStartingWindow;
|
||||
final boolean animate;
|
||||
if (mStartingData != null) {
|
||||
animate = prepareAnimation && mStartingData.needRevealAnimation()
|
||||
@@ -2779,7 +2780,19 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
return;
|
||||
}
|
||||
|
||||
surface.remove(animate);
|
||||
if (animate && mTransitionController.inCollectingTransition(startingWindow)
|
||||
&& startingWindow.cancelAndRedraw()) {
|
||||
// Defer remove starting window after transition start.
|
||||
// If splash screen window was in collecting, the client side is unable to draw because
|
||||
// of Session#cancelDraw, which will blocking the remove animation.
|
||||
startingWindow.mSyncTransaction.addTransactionCommittedListener(Runnable::run, () -> {
|
||||
synchronized (mAtmService.mGlobalLock) {
|
||||
surface.remove(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
surface.remove(animate);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user