Merge "Clear ZBoost when removing animation leash" into tm-dev am: 2e495889be

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

Change-Id: I6660e9eded197d665ebf29355cc1d7329d4a29c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Riddle Hsu
2022-04-11 09:01:15 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 0 deletions

View File

@@ -3181,6 +3181,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
mLastLayer = -1;
mWmService.mSurfaceAnimationRunner.onAnimationLeashLost(mAnimationLeash, t);
mAnimationLeash = null;
mNeedsZBoost = false;
reassignLayer(t);
updateSurfacePosition(t);
}

View File

@@ -88,6 +88,11 @@ public class AppWindowTokenAnimationTests extends WindowTestsBase {
verify(mTransaction).setLayer(eq(mActivity.mAnimationBoundsLayer),
intThat(layer -> layer > topActivity.getLastLayer()));
// The layer should be restored after the animation leash is removed.
mActivity.onAnimationLeashLost(mTransaction);
assertThat(mActivity.mNeedsZBoost).isFalse();
assertThat(topActivity.getLastLayer()).isGreaterThan(mActivity.getLastLayer());
}
@Test