Improve the falsing logic for unlock motion
Bug: 20563134
Change-Id: I628829915ad2cc7f1df5d0c971def44f6eacdae4
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 7d61099..b87c25b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -518,9 +518,9 @@
@Override
protected void flingToHeight(float vel, boolean expand, float target,
- float collapseSpeedUpFactor) {
+ float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) {
mHeadsUpTouchHelper.notifyFling(!expand);
- super.flingToHeight(vel, expand, target, collapseSpeedUpFactor);
+ super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing);
}
@Override
@@ -771,8 +771,8 @@
}
@Override
- protected boolean flingExpands(float vel, float vectorVel) {
- boolean expands = super.flingExpands(vel, vectorVel);
+ protected boolean flingExpands(float vel, float vectorVel, float x, float y) {
+ boolean expands = super.flingExpands(vel, vectorVel, x, y);
// If we are already running a QS expansion, make sure that we keep the panel open.
if (mQsExpansionAnimator != null) {
@@ -786,6 +786,11 @@
return mStatusBar.getBarState() != StatusBarState.SHADE;
}
+ @Override
+ protected boolean shouldGestureIgnoreXTouchSlop(float x, float y) {
+ return !mAfforanceHelper.isOnAffordanceIcon(x, y);
+ }
+
private void onQsTouch(MotionEvent event) {
int pointerIndex = event.findPointerIndex(mTrackingPointer);
if (pointerIndex < 0) {