diff options
author | 2022-07-20 09:26:56 +0000 | |
---|---|---|
committer | 2022-07-20 09:26:56 +0000 | |
commit | 34ffe6d58bd5d96e08b43512274b00c0f98f540d (patch) | |
tree | 05f69b24d879e055d3e64bef5bf5bea1fa6ec370 | |
parent | edc5347ff76436fc161a256085fc9406990124ff (diff) | |
parent | 639ce39189e01e7253f5845f303c76b97de053c8 (diff) |
Merge "Don't schedule SurfaceControl transaction if it is not valid" into tm-qpr-dev
-rw-r--r-- | packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt index fbe33565f11d..8ddd430dadbc 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt @@ -523,9 +523,10 @@ class ActivityLaunchAnimator( state: LaunchAnimator.State, linearProgress: Float, ) { - if (transactionApplierView.viewRootImpl == null) { - // If the view root we synchronize with was detached, don't apply any transaction - // (as [SyncRtSurfaceTransactionApplier.scheduleApply] would otherwise throw). + if (transactionApplierView.viewRootImpl == null || !window.leash.isValid) { + // Don't apply any transaction if the view root we synchronize with was detached or + // if the SurfaceControl associated with [window] is not valid, as + // [SyncRtSurfaceTransactionApplier.scheduleApply] would otherwise throw. return } @@ -605,9 +606,10 @@ class ActivityLaunchAnimator( state: LaunchAnimator.State, linearProgress: Float ) { - if (transactionApplierView.viewRootImpl == null) { - // If the view root we synchronize with was detached, don't apply any transaction - // (as [SyncRtSurfaceTransactionApplier.scheduleApply] would otherwise throw). + if (transactionApplierView.viewRootImpl == null || !navigationBar.leash.isValid) { + // Don't apply any transaction if the view root we synchronize with was detached or + // if the SurfaceControl associated with [navigationBar] is not valid, as + // [SyncRtSurfaceTransactionApplier.scheduleApply] would otherwise throw. return } |