diff options
author | 2025-03-20 13:43:15 +0000 | |
---|---|---|
committer | 2025-03-20 13:43:15 +0000 | |
commit | 890e2aaf96abdb0932ed3f4b7d023610eab66232 (patch) | |
tree | 40bdaa9f607dac24111ca87c46f0c421ed27c098 | |
parent | a70b1cdd016696bba12030385c6a0d63c3f4ac1c (diff) |
Avoid reparenting an invalid leash.
This prevents a crash during the animation. Not sure why a leash
would be invalid at the beginning of the animation, but it seems to
happen sometimes.
Fix: 404819250
Flag: com.android.systemui.move_transition_animation_layer
Test: atest ActivityTransitionAnimator + manual validation
Change-Id: I384291cb38ec9f26b10f958be8a4ba0bbe70601a
-rw-r--r-- | packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt index 440a81fc2152..0680faf5226a 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt @@ -1483,7 +1483,8 @@ constructor( // TODO(b/397646693): remove this exception. val isEligibleForReparenting = controller.isLaunching val viewRoot = controller.transitionContainer.viewRootImpl - val skipReparenting = skipReparentTransaction || viewRoot == null + val skipReparenting = + skipReparentTransaction || !window.leash.isValid || viewRoot == null if (moveTransitionAnimationLayer() && isEligibleForReparenting && !skipReparenting) { reparent = true } |