Fixes rejected dismiss gestures (framework version of ag/677161)
Gus's original change description:
This change modifies the logic in SwipeDismissLayout which determines
whether or not a gesture should be interpreted as a dismiss
gesture.
Previously, on the first touch move event, the gesture was classified
as a dismiss gesture if the X movement exceeded the touch slop
and the Y movement did not. At this point the gesture was not
intercepted and the underlying widget (in the case of the cue
card, the GridViewPager) received all subsequent move events.
In the case of a very fast gesture at a slight vertical angle, it was
easy for the total Y movement to exceed the touch slop.
This change only rejects the gesture if the Y movement exceeds
the X movement, which is consistent with how GridViewPager
distinguishes horizontal vs. vertical swipes.
This change also cancels the dismissal if the end of the gesture
is a leftwards flight.
BUG: 20542762
(Same as b/20350515 but for Activity dismissal at the system level.)
Change-Id: I6e3fb646c42dda0d1c1f5552d91b27c6374fc08c
1 file changed