summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jordan Demeulenaere <jdemeulenaere@google.com> 2022-07-25 15:27:30 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-07-25 15:27:30 +0000
commit4727471752eb17f208f51f48da48ae7ffb942496 (patch)
tree1fb2b673fa35c4cafecd37fb242047bf9df02469
parentde170f1f5ef0b7d8be14e67bd20da822848b481a (diff)
parente0c7fee38ba92a58b8a2060d16156394d715fcaa (diff)
Merge "Don't schedule SurfaceControl transaction if it is not valid" into tm-d1-dev am: e0c7fee38b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19340858 Change-Id: If3075cee2fee1e48311ac4b239cf566fd659cce5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt14
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 bb6eb78aac65..323db8526470 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
@@ -494,9 +494,10 @@ class ActivityLaunchAnimator(
}
private fun applyStateToWindow(window: RemoteAnimationTarget, state: LaunchAnimator.State) {
- 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
}
@@ -557,9 +558,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
}