Improved interception logic of the PanelView
It was previously possible to get into undesired states when closing
the shade and clicking on it in midtransition. This was also triggered
when double tapping a card.
Bug: 14130526
Change-Id: I6b73f348dba4ee21d2401004176a9c6cc0c59745
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 328a172..eb9ecc4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -526,11 +526,14 @@
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
+ if (mTimeAnimator.isRunning()) {
+ mTimeAnimator.cancel(); // end any outstanding animations
+ return true;
+ }
mInitialTouchY = y;
mInitialTouchX = x;
initVelocityTracker();
trackMovement(event);
- mTimeAnimator.cancel(); // end any outstanding animations
break;
case MotionEvent.ACTION_POINTER_UP:
final int upPointer = event.getPointerId(event.getActionIndex());
@@ -569,7 +572,7 @@
}
protected boolean isScrolledToBottom() {
- return false;
+ return true;
}
protected float getContentHeight() {