Skip to content

Commit be2cf32

Browse files
committed
Be a little more lenient with panel-open gestures.
The code would not consider any drag that did not complete the "peek" distance (the distance the panel opens when you press and hold on the status bar; on tablets this is statusbarheight + closehandleheight, and on phones it's headerheight + closehandleheight) as a candidate for a fling, and set that drag's effective velocity to 0. This CL just removes that check. Now a fling must meet the minimum linear velocity and minimum Y distance thresholds (100dp/sec and 20dp, respectively) to change the position of the panel (closed->open or open->closed). Bug: 7390976 Change-Id: Ia0c2450f9fdf3f27b890aab240a155dad1ab052f
1 parent 50a5313 commit be2cf32

File tree

1 file changed

+2
-4
lines changed
  • packages/SystemUI/src/com/android/systemui/statusbar/phone

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,18 +336,16 @@ public boolean onTouch(View v, MotionEvent event) {
336336
final float deltaY = Math.abs(mFinalTouchY - mInitialTouchY);
337337
if (deltaY < mFlingGestureMinDistPx
338338
|| vel < mFlingExpandMinVelocityPx
339-
|| mJustPeeked) {
339+
) {
340340
vel = 0;
341341
}
342342

343343
if (negative) {
344344
vel = -vel;
345345
}
346346

347-
if (DEBUG) LOG("gesture: dy=%f vraw=(%f,%f) vnorm=(%f,%f) vlinear=%f",
347+
if (DEBUG) LOG("gesture: dy=%f vel=(%f,%f) vlinear=%f",
348348
deltaY,
349-
mVelocityTracker.getXVelocity(),
350-
mVelocityTracker.getYVelocity(),
351349
xVel, yVel,
352350
vel);
353351

0 commit comments

Comments
 (0)