Merge "Wait starting window finished in syncInputTransactions" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
477b8b4e32
@@ -8117,9 +8117,15 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// This could prevent if there is no container animation, we still have to apply the
|
// This could prevent if there is no container animation, we still have to apply the
|
||||||
// pending transaction and exit waiting.
|
// pending transaction and exit waiting.
|
||||||
mAnimator.mNotifyWhenNoAnimation = true;
|
mAnimator.mNotifyWhenNoAnimation = true;
|
||||||
|
boolean animateStarting = false;
|
||||||
while (timeoutRemaining > 0) {
|
while (timeoutRemaining > 0) {
|
||||||
|
// Waiting until all starting windows has finished animating.
|
||||||
|
animateStarting = mRoot.forAllActivities(a -> {
|
||||||
|
return a.hasStartingWindow();
|
||||||
|
});
|
||||||
boolean isAnimating = mAnimator.isAnimationScheduled()
|
boolean isAnimating = mAnimator.isAnimationScheduled()
|
||||||
|| mRoot.isAnimating(TRANSITION | CHILDREN, ANIMATION_TYPE_ALL);
|
|| mRoot.isAnimating(TRANSITION | CHILDREN, ANIMATION_TYPE_ALL)
|
||||||
|
|| animateStarting;
|
||||||
if (!isAnimating) {
|
if (!isAnimating) {
|
||||||
// isAnimating is a legacy transition query and will be removed, so also add
|
// isAnimating is a legacy transition query and will be removed, so also add
|
||||||
// a check for whether this is in a shell-transition when not using legacy.
|
// a check for whether this is in a shell-transition when not using legacy.
|
||||||
@@ -8139,13 +8145,14 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
WindowContainer animatingContainer;
|
WindowContainer animatingContainer;
|
||||||
animatingContainer = mRoot.getAnimatingContainer(TRANSITION | CHILDREN,
|
animatingContainer = mRoot.getAnimatingContainer(TRANSITION | CHILDREN,
|
||||||
ANIMATION_TYPE_ALL);
|
ANIMATION_TYPE_ALL);
|
||||||
if (mAnimator.isAnimationScheduled() || animatingContainer != null) {
|
if (mAnimator.isAnimationScheduled() || animatingContainer != null || animateStarting) {
|
||||||
Slog.w(TAG, "Timed out waiting for animations to complete,"
|
Slog.w(TAG, "Timed out waiting for animations to complete,"
|
||||||
+ " animatingContainer=" + animatingContainer
|
+ " animatingContainer=" + animatingContainer
|
||||||
+ " animationType=" + SurfaceAnimator.animationTypeToString(
|
+ " animationType=" + SurfaceAnimator.animationTypeToString(
|
||||||
animatingContainer != null
|
animatingContainer != null
|
||||||
? animatingContainer.mSurfaceAnimator.getAnimationType()
|
? animatingContainer.mSurfaceAnimator.getAnimationType()
|
||||||
: SurfaceAnimator.ANIMATION_TYPE_NONE));
|
: SurfaceAnimator.ANIMATION_TYPE_NONE)
|
||||||
|
+ " animateStarting=" + animateStarting);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user