diff options
| -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)  |