From 6168de06e53641acfb77430e6f8770e92b0338ae Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Wed, 14 Jul 2021 17:51:08 +0100 Subject: [PATCH] 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 --- .../com/android/launcher3/tapl/LauncherInstrumentation.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 9d6cb4ecd0..42f9cb80f6 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -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:");