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

Commit 5844f3b9 authored by Daniel Sandler's avatar Daniel Sandler Committed by The Android Automerger
Browse files

Fix crash in SystemUI.

It looks like we were end()ing the main timing animation in
the middle of the animation (and too many times, at that).

Bug: 6992223
Change-Id: I6a4b7d692171baa73f6211c7843e164b05383a30
parent 94c194a7
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -59,6 +59,11 @@ public class PanelView extends FrameLayout {
        }
    };

    private final Runnable mStopAnimator = new Runnable() { public void run() {
        if (mTimeAnimator.isStarted()) {
            mTimeAnimator.end(); }
    }};

    private float mVel, mAccel;
    private int mFullHeight = 0;
    private String mViewName; 
@@ -117,7 +122,7 @@ public class PanelView extends FrameLayout {
            if (mVel == 0
                    || (closing && mExpandedHeight == 0)
                    || (!closing && mExpandedHeight == getFullHeight())) {
                mTimeAnimator.end();
                post(mStopAnimator);
            }
        }
    }
@@ -277,7 +282,7 @@ public class PanelView extends FrameLayout {


    public void setExpandedHeight(float height) {
        mTimeAnimator.end();
        post(mStopAnimator);
        setExpandedHeightInternal(height);
    }