Add error detection for aborting the recents scrolling during transition to home
Bug: 227514916 Test: swiped to overview, to home and quick switch and checked the logs Change-Id: Ie02d3933e2fb05eedd9c264a381329bc04feac2d
This commit is contained in:
@@ -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
|
||||
@@ -111,6 +112,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),
|
||||
@@ -161,6 +172,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