Release predict_back animaton leash in Launcher.
Release the animation leash after back_to_home animation done.
Flag: EXEMPT bugfix
Bug: 395035430
Test: Use the back gesture to trigger the back_to_home animation
multiple times and perform multiple random transitions, dumping the
Surface Flinger to check the predict_back leashes not remain in the
offscreen layer.
Change-Id: I7ed9dfd510e38bed28b51762df9976d33c4a5644
diff --git a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java
index be0a339..783ec2c 100644
--- a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java
+++ b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java
@@ -514,7 +514,13 @@
private void finishAnimation() {
mLauncher.setPredictiveBackToHomeInProgress(false);
+ if (mBackTarget != null && mBackTarget.leash.isValid()) {
+ mBackTarget.leash.release();
+ }
mBackTarget = null;
+ if (mLauncherTarget != null && mLauncherTarget.leash.isValid()) {
+ mLauncherTarget.leash.release();
+ }
mLauncherTarget = null;
mBackInProgress = false;
mBackProgress = 0;