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
Loading
Please register or sign in to comment