Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 890e2aaf authored by Luca Zuccarini's avatar Luca Zuccarini
Browse files

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
parent a70b1cdd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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
            }