Fix QS expansion weirdness #2
Bug: 17138703
Bug: 17047680
Change-Id: I4058d9a2e349c4a52ab167638471a1eb11753380
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 decaeb6..b175fd5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -58,7 +58,7 @@
private boolean mHasLayoutedSinceDown;
private float mUpdateFlingVelocity;
private boolean mUpdateFlingOnLayout;
- private boolean mTouching;
+ private boolean mPeekTouching;
private boolean mJustPeeked;
private boolean mClosing;
protected boolean mTracking;
@@ -233,7 +233,7 @@
mPanelClosedOnDown = mExpandedHeight == 0.0f;
mHasLayoutedSinceDown = false;
mUpdateFlingOnLayout = false;
- mTouching = true;
+ mPeekTouching = mPanelClosedOnDown;
if (mVelocityTracker == null) {
initVelocityTracker();
}
@@ -337,7 +337,7 @@
mVelocityTracker.recycle();
mVelocityTracker = null;
}
- mTouching = false;
+ mPeekTouching = false;
break;
}
return !waitForTouchSlop || mTracking;
@@ -399,7 +399,6 @@
mPanelClosedOnDown = mExpandedHeight == 0.0f;
mHasLayoutedSinceDown = false;
mUpdateFlingOnLayout = false;
- mTouching = true;
initVelocityTracker();
trackMovement(event);
break;
@@ -434,7 +433,6 @@
break;
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
- mTouching = false;
break;
}
return false;
@@ -571,7 +569,7 @@
&& currentMaxPanelHeight != mExpandedHeight
&& !mPeekPending
&& mPeekAnimator == null
- && !mTouching) {
+ && !mPeekTouching) {
setExpandedHeight(currentMaxPanelHeight);
}
}