OSDN Git Service

Fixed a bug where the panel could be stuck
authorSelim Cinek <cinek@google.com>
Wed, 21 Jun 2017 16:44:52 +0000 (09:44 -0700)
committerSelim Cinek <cinek@google.com>
Wed, 21 Jun 2017 16:46:47 +0000 (09:46 -0700)
Test: collapse the panels, let go, tap quickly, panel isn't stuck
Bug: 62602000
Change-Id: I449bcd4a6207c054eb5d536ba48ff8f05e26eb9a

packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java

index b1d82b1..7462c27 100644 (file)
@@ -303,10 +303,10 @@ public abstract class PanelView extends FrameLayout {
                 trackMovement(event);
                 if (!mGestureWaitForTouchSlop || (mHeightAnimator != null && !mHintAnimationRunning)
                         || mPeekAnimator != null) {
-                    cancelHeightAnimator();
-                    cancelPeek();
                     mTouchSlopExceeded = (mHeightAnimator != null && !mHintAnimationRunning)
                             || mPeekAnimator != null;
+                    cancelHeightAnimator();
+                    cancelPeek();
                     onTrackingStarted();
                 }
                 if (isFullyCollapsed() && !mHeadsUpManager.hasPinnedHeadsUp()) {
@@ -607,6 +607,9 @@ public abstract class PanelView extends FrameLayout {
 
     protected void cancelHeightAnimator() {
         if (mHeightAnimator != null) {
+            if (mHeightAnimator.isRunning()) {
+                mPanelUpdateWhenAnimatorEnds = false;
+            }
             mHeightAnimator.cancel();
         }
         endClosing();