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

Commit 43a60af5 authored by Joshua Tsuji's avatar Joshua Tsuji
Browse files

Check if the animation is null before trying to start it.

Test: atest SystemUITests
Bug: 147434271
Change-Id: I442afdfaca0744711a9d9fcacf84e778ea516308
parent c4daa649
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -961,6 +961,13 @@ public class PhysicsAnimationLayout extends FrameLayout {
            if (view != null) {
                final SpringAnimation animation =
                        (SpringAnimation) view.getTag(getTagIdForProperty(property));

                // If the animation is null, the view was probably removed from the layout before
                // the animation started.
                if (animation == null) {
                    return;
                }

                if (afterCallbacks != null) {
                    animation.addEndListener(new OneTimeEndListener() {
                        @Override