Adapted HUN behavior when swiping vertically

It's not dismissed anymore but pushed into the shade
when swiping up.
Also, when swiping down, we now dimiss the HUN.

Bug: 15594813
Change-Id: I0b6a761bebbe281e31bf3b1e20704e2e5da07861
This commit is contained in:
Selim Cinek
2014-11-05 14:11:32 +01:00
parent 9bd9d0c96a
commit e52abb3e91

View File

@@ -397,14 +397,11 @@ public class HeadsUpNotificationView extends FrameLayout implements SwipeHelper.
final float daX = Math.abs(ev.getX() - mFirstX);
final float daY = Math.abs(dY);
if (!mConsuming && daX < daY && daY > mTouchSlop) {
releaseAndClose();
if (dY > 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG, "found an open");
mBar.animateExpandNotificationsPanel();
}
if (dY < 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG, "found a close");
mBar.onHeadsUpDismissed();
}
mConsuming = true;
}
break;