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

Commit 454e0ffc authored by Luca Zuccarini's avatar Luca Zuccarini
Browse files

Prevent a crash in the Animation library.

It seems that we can't rely on the leash being valid just because
we had an `isValid` check before the reparenting takes place, so we
need to wrap the call in a try/catch.

Note that given that the reparenting _can_ fail, we need the rest of
the animation to behave accordingly. `startAnimation` is called
before `onTransitionAnimationStart()`, and we used to pass a boolean
argument to control how the fades work. Since this value is
contingent on whether reparenting actually succeeds, the parameter
is now a lambda that checks `reparent` in real time and outputs the
correct boolean accordingly.

Fix: b/412640764
Flag: com.android.systemui.move_transition_animation_layer
Test: atest ActivityTransitionAnimator TransitionAnimator + manual testing of the core usages
Change-Id: Ice2c0a204db693fe7f1d86f8e16a2c855fb897cc
parent 92b95d68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment