summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Luca Zuccarini <acul@google.com> 2025-03-14 10:43:16 +0000
committer Luca Zuccarini <acul@google.com> 2025-03-14 10:43:16 +0000
commit0955ae43a32e25fb14a2538ec0c409ab76fd3a66 (patch)
treead11ee82b97d5c2c8dc4538faa8bd0ae3cfaba91
parent09558664c3d588c5bef8a43369410103ad50fed5 (diff)
Prevent leak of transition leashes in RemoteAnimationRunnerCompat.
Bug: 390422470 Flag: EXEMPT bugfix Test: manual + winscope Change-Id: Ibbfcbb87e5f8b0007d26a4151ac6de8ef2c5856a
-rw-r--r--packages/SystemUI/animation/src/com/android/systemui/animation/RemoteAnimationRunnerCompat.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/RemoteAnimationRunnerCompat.java b/packages/SystemUI/animation/src/com/android/systemui/animation/RemoteAnimationRunnerCompat.java
index ca94482b9c5a..2697b73a1c58 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/animation/RemoteAnimationRunnerCompat.java
+++ b/packages/SystemUI/animation/src/com/android/systemui/animation/RemoteAnimationRunnerCompat.java
@@ -197,6 +197,10 @@ public abstract class RemoteAnimationRunnerCompat extends IRemoteAnimationRunner
// Release surface references now. This is apparently to free GPU memory
// before GC would.
info.releaseAllSurfaces();
+ // Make sure that the transition leashes created are not leaked.
+ for (SurfaceControl leash : leashMap.values()) {
+ finishTransaction.reparent(leash, null);
+ }
// Don't release here since launcher might still be using them. Instead
// let launcher release them (eg. via RemoteAnimationTargets)
leashMap.clear();