summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-05-12 23:46:19 +0200
committerJorim Jaggi <jjaggi@google.com>2014-05-13 17:28:31 +0200
commitc9a52ab01faf7428b44e760becbfb4c157eb9042 (patch)
treee01f7ed7d65a325341564081f2ee628a8e99d696 /packages/SystemUI/src
parent87cd5e71ec087e191b8baaa8913a878f92d4e10d (diff)
downloadframeworks_base-c9a52ab01faf7428b44e760becbfb4c157eb9042.zip
frameworks_base-c9a52ab01faf7428b44e760becbfb4c157eb9042.tar.gz
frameworks_base-c9a52ab01faf7428b44e760becbfb4c157eb9042.tar.bz2
Fix weird state when flinging with open quick settings.
Change-Id: Ib590eb091f8b5cae218824cf1d4c4ee78377b016
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java19
1 files changed, 13 insertions, 6 deletions
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 f19ce97..150db63 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -249,6 +249,11 @@ public class NotificationPanelView extends PanelView implements
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
+ trackMovement(event);
+ if (mTracking) {
+ flingWithCurrentVelocity();
+ mTracking = false;
+ }
mIntercepting = false;
break;
}
@@ -264,6 +269,13 @@ public class NotificationPanelView extends PanelView implements
}
}
+ private void flingWithCurrentVelocity() {
+ float vel = getCurrentVelocity();
+
+ // TODO: Better logic whether we should expand or not.
+ flingSettings(vel, vel > 0);
+ }
+
@Override
public boolean onTouchEvent(MotionEvent event) {
// TODO: Handle doublefinger swipe to notifications again. Look at history for a reference
@@ -313,12 +325,7 @@ public class NotificationPanelView extends PanelView implements
mTracking = false;
mTrackingPointer = -1;
trackMovement(event);
-
- float vel = getCurrentVelocity();
-
- // TODO: Better logic whether we should expand or not.
- flingSettings(vel, vel > 0);
-
+ flingWithCurrentVelocity();
if (mVelocityTracker != null) {
mVelocityTracker.recycle();
mVelocityTracker = null;