Merge "Add error detection for aborting the recents scrolling during transition to home" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
839297e232
@@ -33,9 +33,10 @@ public class ActiveGestureErrorDetector {
|
||||
* Enums associated to gesture navigation events.
|
||||
*/
|
||||
public enum GestureEvent {
|
||||
MOTION_DOWN, MOTION_UP, SET_END_TARGET, ON_SETTLED_ON_END_TARGET, START_RECENTS_ANIMATION,
|
||||
FINISH_RECENTS_ANIMATION, CANCEL_RECENTS_ANIMATION, SET_ON_PAGE_TRANSITION_END_CALLBACK,
|
||||
CANCEL_CURRENT_ANIMATION, CLEANUP_SCREENSHOT,
|
||||
MOTION_DOWN, MOTION_UP, SET_END_TARGET, SET_END_TARGET_HOME, ON_SETTLED_ON_END_TARGET,
|
||||
START_RECENTS_ANIMATION, FINISH_RECENTS_ANIMATION, CANCEL_RECENTS_ANIMATION,
|
||||
SET_ON_PAGE_TRANSITION_END_CALLBACK, CANCEL_CURRENT_ANIMATION, CLEANUP_SCREENSHOT,
|
||||
SCROLLER_ANIMATION_ABORTED,
|
||||
|
||||
/**
|
||||
* These GestureEvents are specifically associated to state flags that get set in
|
||||
@@ -123,6 +124,16 @@ public class ActiveGestureErrorDetector {
|
||||
+ "being set.",
|
||||
writer);
|
||||
break;
|
||||
case SCROLLER_ANIMATION_ABORTED:
|
||||
errorDetected |= printErrorIfTrue(
|
||||
encounteredEvents.contains(GestureEvent.SET_END_TARGET_HOME)
|
||||
&& !encounteredEvents.contains(
|
||||
GestureEvent.ON_SETTLED_ON_END_TARGET),
|
||||
/* errorMessage= */ prefix + "\t\trecents view scroller animation "
|
||||
+ "aborted after setting end target HOME, but before"
|
||||
+ " settling on end target.",
|
||||
writer);
|
||||
break;
|
||||
case STATE_GESTURE_COMPLETED:
|
||||
errorDetected |= printErrorIfTrue(
|
||||
!encounteredEvents.contains(GestureEvent.MOTION_UP),
|
||||
@@ -173,6 +184,7 @@ public class ActiveGestureErrorDetector {
|
||||
break;
|
||||
case MOTION_DOWN:
|
||||
case SET_END_TARGET:
|
||||
case SET_END_TARGET_HOME:
|
||||
case START_RECENTS_ANIMATION:
|
||||
case SET_ON_PAGE_TRANSITION_END_CALLBACK:
|
||||
case CANCEL_CURRENT_ANIMATION:
|
||||
|
||||
Reference in New Issue
Block a user