Improve interaction around showing / hiding the gear behind notifications
If the gesture on the notification was not considered a dismiss gesture
the code always check if the notification had moved enough to display
the gear.
This causes some undesirable behavior:
- For unclearable notifications the gear would *always* be shown
- Even if the velocity of the gesture was enough to be a dismiss it
may have failed other requirements and then the gear would be
shown
This CL alters NotificationSwipeHelper to take into account the
velocity of the gesture, and if it was great enough to be a dismiss
but wasn't (unclearable, didn't meet other requirements) it'll just
snap the notification back into place.
Additionally this CL alters the behavior so that if the gear is
visible and the notification is swiped in the direction of the gear
it *won't* dismiss the notification but rather cover the gear. If
a dismiss gesture is made in the opposite direction of the gear, the
notification will still be dismissed.
Bug: 27378399
Bug: 27319053
Bug: 27335353
Change-Id: I0849eecc71f2c6722e811d284534c2ea29b1b8aa
3 files changed