diff options
| author | 2025-03-19 12:21:21 +0000 | |
|---|---|---|
| committer | 2025-03-19 05:24:06 -0700 | |
| commit | 67f210f77a650094eacdfae07a40aabafc462c51 (patch) | |
| tree | a5056b8ef9726e415249ff435e5948425f96f124 | |
| parent | 0955ae43a32e25fb14a2538ec0c409ab76fd3a66 (diff) | |
Fix NPE when reparenting a leash that has already been released.
TIL that even when reparenting to null, the leash has to be valid (i.e.
have an underlying native object associated to it). This is only true
when the leash has not yet been released.
Fix: 404507270
Flag: EXEMPT bugfix
Test: manual
Change-Id: I9fa182cec821e838bfe1ef7769f1a7405291019e
| -rw-r--r-- | packages/SystemUI/animation/src/com/android/systemui/animation/RemoteAnimationRunnerCompat.java | 4 |
1 files changed, 3 insertions, 1 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 2697b73a1c58..e0a362643518 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/RemoteAnimationRunnerCompat.java +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/RemoteAnimationRunnerCompat.java @@ -199,7 +199,9 @@ public abstract class RemoteAnimationRunnerCompat extends IRemoteAnimationRunner info.releaseAllSurfaces(); // Make sure that the transition leashes created are not leaked. for (SurfaceControl leash : leashMap.values()) { - finishTransaction.reparent(leash, null); + if (leash.isValid()) { + finishTransaction.reparent(leash, null); + } } // Don't release here since launcher might still be using them. Instead // let launcher release them (eg. via RemoteAnimationTargets) |