diff options
| -rw-r--r-- | packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java index 2bdbf0bf3c22..221782e950d0 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java @@ -20,6 +20,7 @@ import android.app.WindowConfiguration; import android.graphics.Point; import android.graphics.Rect; import android.view.RemoteAnimationTarget; +import android.view.SurfaceControl; /** * @see RemoteAnimationTarget @@ -47,6 +48,8 @@ public class RemoteAnimationTargetCompat { public final boolean isNotInRecents; public final Rect contentInsets; + private final SurfaceControl mStartLeash; + public RemoteAnimationTargetCompat(RemoteAnimationTarget app) { taskId = app.taskId; mode = app.mode; @@ -59,6 +62,8 @@ public class RemoteAnimationTargetCompat { isNotInRecents = app.isNotInRecents; contentInsets = app.contentInsets; activityType = app.windowConfiguration.getActivityType(); + + mStartLeash = app.startLeash; } public static RemoteAnimationTargetCompat[] wrap(RemoteAnimationTarget[] apps) { @@ -69,4 +74,14 @@ public class RemoteAnimationTargetCompat { } return appsCompat; } + + /** + * @see SurfaceControl#release() + */ + public void release() { + leash.mSurfaceControl.release(); + if (mStartLeash != null) { + mStartLeash.release(); + } + } }
\ No newline at end of file |