Skip to content

Commit c1dc37c

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "You can only use the 2-finger shortcut when opening the panel." into jb-mr1-dev
2 parents b8460d1 + 2017a05 commit c1dc37c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class NotificationPanelView extends PanelView {
3535
View mHandleView;
3636
int mFingers;
3737
PhoneStatusBar mStatusBar;
38-
private boolean mFlipped;
38+
boolean mOkToFlip;
3939

4040
public NotificationPanelView(Context context, AttributeSet attrs) {
4141
super(context, attrs);
@@ -94,10 +94,10 @@ public boolean onTouchEvent(MotionEvent event) {
9494
if (PhoneStatusBar.SETTINGS_DRAG_SHORTCUT && mStatusBar.mHasFlipSettings) {
9595
switch (event.getActionMasked()) {
9696
case MotionEvent.ACTION_DOWN:
97-
mFlipped = false;
97+
mOkToFlip = getExpandedHeight() == 0;
9898
break;
9999
case MotionEvent.ACTION_POINTER_DOWN:
100-
if (!mFlipped) {
100+
if (mOkToFlip) {
101101
float miny = event.getY(0);
102102
float maxy = miny;
103103
for (int i=1; i<event.getPointerCount(); i++) {
@@ -111,7 +111,7 @@ public boolean onTouchEvent(MotionEvent event) {
111111
} else {
112112
mStatusBar.flipToSettings();
113113
}
114-
mFlipped = true;
114+
mOkToFlip = false;
115115
}
116116
}
117117
break;

0 commit comments

Comments
 (0)