From f132bd7d3fb4a163730ae5b45c05b1b15c7e0fbc Mon Sep 17 00:00:00 2001 From: vadimt Date: Mon, 19 Sep 2022 19:05:10 -0700 Subject: [PATCH] Adding a comment for goHome() Bug: 187761685 Test: presubmit Change-Id: I2917daa90f22cc0da0169c287b02cc4cf37a8f4b --- .../launcher3/tapl/LauncherInstrumentation.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 43766bf496..e0df3f07be 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -893,7 +893,14 @@ public final class LauncherInstrumentation { } /** - * Presses nav bar home button. + * Goes to home by swiping up in zero-button mode or pressing Home button. + * Calling it after another TAPL call is safe because all TAPL methods wait for the animations + * to finish. + * When calling it after a non-TAPL method, make sure that all animations have already + * completed, otherwise it may detect the current state (for example "Application" or "Home") + * incorrectly. + * The method expects either app or Launcher to be active when it's called. Other states, such + * as visible notification shade are not supported. * * @return the Workspace object. */ @@ -1894,8 +1901,9 @@ public final class LauncherInstrumentation { /** * Taps outside container to dismiss. + * * @param container container to be dismissed - * @param tapRight tap on the right of the container if true, or left otherwise + * @param tapRight tap on the right of the container if true, or left otherwise */ void touchOutsideContainer(UiObject2 container, boolean tapRight) { try (LauncherInstrumentation.Closable c = addContextLayer(