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

Commit d6efd00a authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Canceling expand animations as well when starting QS expansion" into mnc-dev

parents 4c2e9ab9 831941fd
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -491,7 +491,7 @@ public class NotificationPanelView extends PanelView implements
    }

    public void closeQs() {
        cancelAnimation();
        cancelQsAnimation();
        setQsExpansion(mQsMinExpansionHeight);
    }

@@ -508,7 +508,7 @@ public class NotificationPanelView extends PanelView implements
    }

    public void openQs() {
        cancelAnimation();
        cancelQsAnimation();
        if (mQsExpansionEnabled) {
            setQsExpansion(mQsMaxExpansionHeight);
        }
@@ -921,7 +921,7 @@ public class NotificationPanelView extends PanelView implements

    @Override
    public void onOverscrollTopChanged(float amount, boolean isRubberbanded) {
        cancelAnimation();
        cancelQsAnimation();
        if (!mQsExpansionEnabled) {
            amount = 0f;
        }
@@ -953,7 +953,8 @@ public class NotificationPanelView extends PanelView implements
    }

    private void onQsExpansionStarted(int overscrollAmount) {
        cancelAnimation();
        cancelQsAnimation();
        cancelHeightAnimator();

        // Reset scroll position and apply that position to the expanded height.
        float height = mQsExpansionHeight - mScrollView.getScrollY() - overscrollAmount;
@@ -1391,7 +1392,7 @@ public class NotificationPanelView extends PanelView implements
        return mVelocityTracker.getYVelocity();
    }

    private void cancelAnimation() {
    private void cancelQsAnimation() {
        if (mQsExpansionAnimator != null) {
            mQsExpansionAnimator.cancel();
        }
+1 −1
Original line number Diff line number Diff line
@@ -535,7 +535,7 @@ public abstract class PanelView extends FrameLayout {
     */
    protected abstract boolean isInContentBounds(float x, float y);

    private void cancelHeightAnimator() {
    protected void cancelHeightAnimator() {
        if (mHeightAnimator != null) {
            mHeightAnimator.cancel();
        }