summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/phone
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2013-06-06 16:48:25 +0200
committerDanny Baumann <dannybaumann@web.de>2013-06-06 17:09:10 +0200
commitf6685c5ca84a42f5a47bf40827d6229dd998dee4 (patch)
treef00fa20477be971870af2692f7df2d44b4890f36 /packages/SystemUI/src/com/android/systemui/statusbar/phone
parent4ed6fd0c617d7642a2056fb99d18e5356f42b60a (diff)
downloadframeworks_base-f6685c5ca84a42f5a47bf40827d6229dd998dee4.zip
frameworks_base-f6685c5ca84a42f5a47bf40827d6229dd998dee4.tar.gz
frameworks_base-f6685c5ca84a42f5a47bf40827d6229dd998dee4.tar.bz2
Fix the flipping animation sometimes being played when pulling the quick
settings with two fingers. Commit c5e8dca7f11d3c085dd1e98692fcc21f1bcc0f6f already tried to fix this before, but was incomplete (and incorrect). The actual issue is that on the first pointer down event, a 'peek' animation runs and expands the notification panel by some pixels (on mako: 160). This amount of pixels is significantly larger than the handle height (on mako: 72). Depending on the timing between peek animation and the second pointer down event, the flip animation would play (if animation already revealed more than 72 pixels) or not. Fix that by not playing the flip animation if only peeking, as the actual panel content is not visible at that point anyway. Also remove the previous incomplete fix in the process. Change-Id: I8997dc7b70143940a519f41da29ffd4d738d8d0c
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/phone')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java2
2 files changed, 3 insertions, 8 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 480dc99..6e635c1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -178,15 +178,10 @@ public class NotificationPanelView extends PanelView {
if (y > maxy) maxy = y;
}
if (maxy - miny < mHandleBarHeight) {
- if (getMeasuredHeight() < mHandleBarHeight) {
+ if (mJustPeeked || getMeasuredHeight() < mHandleBarHeight) {
mStatusBar.switchToSettings();
} else {
- // Do not flip if the drag event started within the top bar
- if (MotionEvent.ACTION_DOWN == event.getActionMasked() && event.getY(0) < mHandleBarHeight ) {
- mStatusBar.switchToSettings();
- } else {
- mStatusBar.flipToSettings();
- }
+ mStatusBar.flipToSettings();
}
mOkToFlip = false;
}
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 0c7a5c5..9e81103 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -70,7 +70,7 @@ public class PanelView extends FrameLayout {
private float mTouchOffset;
private float mExpandedFraction = 0;
private float mExpandedHeight = 0;
- private boolean mJustPeeked;
+ protected boolean mJustPeeked;
private boolean mClosing;
private boolean mRubberbanding;
private boolean mTracking;