Merge "Wait enough time for WMS#waitForAnimationsToComplete" into sc-dev am: 127ea4faf6 am: 42d38d8e5e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14702852

Change-Id: If2824d6b9b163f6075aa4d4828ccc109f6c40b5f
This commit is contained in:
Ming-Shin Lu
2021-05-25 06:04:00 +00:00
committed by Automerger Merge Worker

View File

@@ -8105,11 +8105,10 @@ 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;
WindowContainer animatingContainer = null; while (timeoutRemaining > 0) {
while (mAnimator.isAnimationScheduled() || timeoutRemaining > 0) { boolean isAnimating = mAnimator.isAnimationScheduled()
animatingContainer = mRoot.getAnimatingContainer(TRANSITION | CHILDREN, || mRoot.isAnimating(TRANSITION | CHILDREN, ANIMATION_TYPE_ALL);
ANIMATION_TYPE_ALL); if (!isAnimating) {
if (animatingContainer == null) {
break; break;
} }
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
@@ -8121,6 +8120,9 @@ public class WindowManagerService extends IWindowManager.Stub
} }
mAnimator.mNotifyWhenNoAnimation = false; mAnimator.mNotifyWhenNoAnimation = false;
WindowContainer animatingContainer;
animatingContainer = mRoot.getAnimatingContainer(TRANSITION | CHILDREN,
ANIMATION_TYPE_ALL);
if (mAnimator.isAnimationScheduled() || animatingContainer != null) { if (mAnimator.isAnimationScheduled() || animatingContainer != null) {
Slog.w(TAG, "Timed out waiting for animations to complete," Slog.w(TAG, "Timed out waiting for animations to complete,"
+ " animatingContainer=" + animatingContainer + " animatingContainer=" + animatingContainer