Add logs for pressHome for isLauncherVisible

- Log isLauncherVisble right before the swipe gesture to see if it's a more accurate indicator compared to reading isLauncherVisble earlier

Bug: 193653850
Test: StartLauncherViaGestureTests#testStressPressHome
Change-Id: I4a8303a82f1106c0d1345f561ab469aa4ed59e51
This commit is contained in:
Alex Chau
2021-07-14 17:51:08 +01:00
parent 7609cc4e58
commit 6168de06e5
@@ -735,6 +735,7 @@ public final class LauncherInstrumentation {
dumpViewHierarchy();
action = "swiping up to home";
final boolean launcherIsVisible = isLauncherVisible();
swipeToState(
displaySize.x / 2, displaySize.y - 1,
displaySize.x / 2, 0,
@@ -742,6 +743,9 @@ public final class LauncherInstrumentation {
launcherWasVisible
? GestureScope.INSIDE_TO_OUTSIDE
: GestureScope.OUTSIDE_WITH_PILFER);
// b/193653850: launcherWasVisible is a flaky indicator.
log("launcherWasVisible: " + launcherWasVisible + ", launcherIsVisible: "
+ launcherIsVisible);
}
} else {
log("Hierarchy before clicking home:");