diff --git a/tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java b/tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java index dd286bd1f2..42817c1af7 100644 --- a/tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java +++ b/tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java @@ -17,9 +17,9 @@ package com.android.launcher3.tapl; import android.graphics.Point; -import androidx.test.uiautomator.UiObject2; import androidx.annotation.NonNull; +import androidx.test.uiautomator.UiObject2; /** * Operations on AllApps opened from Overview. @@ -44,6 +44,7 @@ public final class AllAppsFromOverview extends AllApps { allAppsContainer, "search_container_all_apps"); final Point start = qsb.getVisibleCenter(); final int endY = (int) (mLauncher.getDevice().getDisplayHeight() * 0.6); + LauncherInstrumentation.log("AllAppsFromOverview.switchBackToOverview before swipe"); mLauncher.swipe(start.x, start.y, start.x, endY); return new Overview(mLauncher); diff --git a/tests/tapl/com/android/launcher3/tapl/AppIcon.java b/tests/tapl/com/android/launcher3/tapl/AppIcon.java index 17bf5fcece..ea47503eb6 100644 --- a/tests/tapl/com/android/launcher3/tapl/AppIcon.java +++ b/tests/tapl/com/android/launcher3/tapl/AppIcon.java @@ -43,6 +43,7 @@ public final class AppIcon { * Clicks the icon to launch its app. */ public Background launch() { + LauncherInstrumentation.log("AppIcon.launch before click"); LauncherInstrumentation.assertTrue( "Launching an app didn't open a new window: " + mIcon.getText(), mIcon.clickAndWait(Until.newWindow(), LauncherInstrumentation.WAIT_TIME_MS)); diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 434e421b69..441fc65bd3 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -24,6 +24,7 @@ import android.app.UiAutomation; import android.os.Bundle; import android.os.Parcelable; import android.provider.Settings; +import android.util.Log; import android.view.accessibility.AccessibilityEvent; import androidx.annotation.NonNull; @@ -47,6 +48,8 @@ import java.util.concurrent.TimeoutException; */ public final class LauncherInstrumentation { + private static final String TAG = "Tapl"; + // Types for launcher containers that the user is interacting with. "Background" is a // pseudo-container corresponding to inactive launcher covered by another app. enum ContainerType { @@ -119,6 +122,10 @@ public final class LauncherInstrumentation { return mSwipeUpEnabledOverride != null ? mSwipeUpEnabledOverride : mSwipeUpEnabled; } + static void log(String message) { + Log.d(TAG, message); + } + private static void fail(String message) { Assert.fail("http://go/tapl : " + message); } @@ -144,6 +151,7 @@ public final class LauncherInstrumentation { } private UiObject2 verifyContainerType(ContainerType containerType) { + log("verifyContainerType: " + containerType); switch (containerType) { case WORKSPACE: { waitUntilGone(APPS_RES_ID); diff --git a/tests/tapl/com/android/launcher3/tapl/Overview.java b/tests/tapl/com/android/launcher3/tapl/Overview.java index db0e6c5dbc..9841274d6f 100644 --- a/tests/tapl/com/android/launcher3/tapl/Overview.java +++ b/tests/tapl/com/android/launcher3/tapl/Overview.java @@ -17,14 +17,14 @@ package com.android.launcher3.tapl; import android.graphics.Point; + +import androidx.annotation.NonNull; import androidx.test.uiautomator.Direction; import androidx.test.uiautomator.UiObject2; import java.util.Collections; import java.util.List; -import androidx.annotation.NonNull; - /** * Overview pane. */ @@ -46,6 +46,7 @@ public final class Overview extends LauncherInstrumentation.VisibleContainer { */ public void flingForward() { final UiObject2 overview = verifyActiveContainer(); + LauncherInstrumentation.log("Overview.flingForward before fling"); overview.fling(Direction.LEFT, DEFAULT_FLING_SPEED); mLauncher.waitForIdle(); verifyActiveContainer(); @@ -56,6 +57,7 @@ public final class Overview extends LauncherInstrumentation.VisibleContainer { */ public void flingBackward() { final UiObject2 overview = verifyActiveContainer(); + LauncherInstrumentation.log("Overview.flingBackward before fling"); overview.fling(Direction.RIGHT, DEFAULT_FLING_SPEED); mLauncher.waitForIdle(); verifyActiveContainer(); @@ -95,6 +97,7 @@ public final class Overview extends LauncherInstrumentation.VisibleContainer { // Swipe from navbar to the top. final UiObject2 navBar = mLauncher.getSystemUiObject("navigation_bar_frame"); final Point start = navBar.getVisibleCenter(); + LauncherInstrumentation.log("Overview.switchToAllApps before swipe"); mLauncher.swipe(start.x, start.y, start.x, 0); return new AllAppsFromOverview(mLauncher);