From fa0be316dff5b397253e2b0014ff3d2085876c96 Mon Sep 17 00:00:00 2001 From: vadimt Date: Wed, 14 Jul 2021 14:46:00 -0700 Subject: [PATCH] Adding more context to swipe-to-home diags Test: presubmit Bug: 187761685 Change-Id: I89c6bac2258e63d95971dec9a5c688125b885229 --- .../android/launcher3/tapl/LauncherInstrumentation.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 42f9cb80f6..8bb2a382e3 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -699,7 +699,8 @@ public final class LauncherInstrumentation { * @return the Workspace object. */ public Workspace pressHome() { - try (LauncherInstrumentation.Closable e = eventsCheck()) { + try (LauncherInstrumentation.Closable e = eventsCheck(); + LauncherInstrumentation.Closable c = addContextLayer("want to switch to home")) { waitForLauncherInitialized(); // Click home, then wait for any accessibility event, then wait until accessibility // events stop. @@ -719,7 +720,7 @@ public final class LauncherInstrumentation { displaySize.x / 2, 0, ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME, false, GestureScope.INSIDE_TO_OUTSIDE); - try (LauncherInstrumentation.Closable c = addContextLayer( + try (LauncherInstrumentation.Closable c1 = addContextLayer( "Swiped up from context menu to home")) { waitUntilLauncherObjectGone(CONTEXT_MENU_RES_ID); // Swiping up can temporarily bring Nexus Launcher if the current @@ -768,7 +769,7 @@ public final class LauncherInstrumentation { || hasLauncherObject(OVERVIEW_RES_ID)), action); } - try (LauncherInstrumentation.Closable c = addContextLayer( + try (LauncherInstrumentation.Closable c1 = addContextLayer( "performed action to switch to Home - " + action)) { return getWorkspace(); }