Loading src/com/android/launcher3/testing/TestLogging.java +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import android.util.Log; import com.android.launcher3.Utilities; public final class TestLogging { public static synchronized void recordEvent(String event) { public static void recordEvent(String event) { if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { Log.d(TestProtocol.TAPL_EVENTS_TAG, event); } Loading tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java +5 −3 Original line number Diff line number Diff line Loading @@ -37,8 +37,10 @@ public class AddToHomeScreenPrompt { } public void addAutomatically() { try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { mLauncher.waitForObjectInContainer( mWidgetCell.getParent().getParent().getParent().getParent(), By.text(ADD_AUTOMATICALLY)).click(); } } } tests/tapl/com/android/launcher3/tapl/AllApps.java +7 −4 Original line number Diff line number Diff line Loading @@ -99,7 +99,8 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { */ @NonNull public AppIcon getAppIcon(String appName) { try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "getting app icon " + appName + " on all apps")) { final UiObject2 allAppsContainer = verifyActiveContainer(); final UiObject2 appListRecycler = mLauncher.waitForObjectInContainer(allAppsContainer, Loading Loading @@ -197,7 +198,8 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { * Flings forward (down) and waits the fling's end. */ public void flingForward() { try (LauncherInstrumentation.Closable c = try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer("want to fling forward in all apps")) { final UiObject2 allAppsContainer = verifyActiveContainer(); // Start the gesture in the center to avoid starting at elements near the top. Loading @@ -211,7 +213,8 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { * Flings backward (up) and waits the fling's end. */ public void flingBackward() { try (LauncherInstrumentation.Closable c = try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer("want to fling backward in all apps")) { final UiObject2 allAppsContainer = verifyActiveContainer(); // Start the gesture in the center, for symmetry with forward. Loading tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java +3 −2 Original line number Diff line number Diff line Loading @@ -42,7 +42,8 @@ public final class AllAppsFromOverview extends AllApps { */ @NonNull public Overview switchBackToOverview() { try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "want to switch back from all apps to overview")) { final UiObject2 allAppsContainer = verifyActiveContainer(); // Swipe from the search box to the bottom. Loading tests/tapl/com/android/launcher3/tapl/AppIcon.java +4 −2 Original line number Diff line number Diff line Loading @@ -39,9 +39,11 @@ public final class AppIcon extends Launchable { * Long-clicks the icon to open its menu. */ public AppIconMenu openMenu() { try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { return new AppIconMenu(mLauncher, mLauncher.clickAndGet( mObject, "deep_shortcuts_container")); } } @Override protected String getLongPressIndicator() { Loading Loading
src/com/android/launcher3/testing/TestLogging.java +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import android.util.Log; import com.android.launcher3.Utilities; public final class TestLogging { public static synchronized void recordEvent(String event) { public static void recordEvent(String event) { if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { Log.d(TestProtocol.TAPL_EVENTS_TAG, event); } Loading
tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java +5 −3 Original line number Diff line number Diff line Loading @@ -37,8 +37,10 @@ public class AddToHomeScreenPrompt { } public void addAutomatically() { try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { mLauncher.waitForObjectInContainer( mWidgetCell.getParent().getParent().getParent().getParent(), By.text(ADD_AUTOMATICALLY)).click(); } } }
tests/tapl/com/android/launcher3/tapl/AllApps.java +7 −4 Original line number Diff line number Diff line Loading @@ -99,7 +99,8 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { */ @NonNull public AppIcon getAppIcon(String appName) { try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "getting app icon " + appName + " on all apps")) { final UiObject2 allAppsContainer = verifyActiveContainer(); final UiObject2 appListRecycler = mLauncher.waitForObjectInContainer(allAppsContainer, Loading Loading @@ -197,7 +198,8 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { * Flings forward (down) and waits the fling's end. */ public void flingForward() { try (LauncherInstrumentation.Closable c = try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer("want to fling forward in all apps")) { final UiObject2 allAppsContainer = verifyActiveContainer(); // Start the gesture in the center to avoid starting at elements near the top. Loading @@ -211,7 +213,8 @@ public class AllApps extends LauncherInstrumentation.VisibleContainer { * Flings backward (up) and waits the fling's end. */ public void flingBackward() { try (LauncherInstrumentation.Closable c = try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer("want to fling backward in all apps")) { final UiObject2 allAppsContainer = verifyActiveContainer(); // Start the gesture in the center, for symmetry with forward. Loading
tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java +3 −2 Original line number Diff line number Diff line Loading @@ -42,7 +42,8 @@ public final class AllAppsFromOverview extends AllApps { */ @NonNull public Overview switchBackToOverview() { try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "want to switch back from all apps to overview")) { final UiObject2 allAppsContainer = verifyActiveContainer(); // Swipe from the search box to the bottom. Loading
tests/tapl/com/android/launcher3/tapl/AppIcon.java +4 −2 Original line number Diff line number Diff line Loading @@ -39,9 +39,11 @@ public final class AppIcon extends Launchable { * Long-clicks the icon to open its menu. */ public AppIconMenu openMenu() { try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { return new AppIconMenu(mLauncher, mLauncher.clickAndGet( mObject, "deep_shortcuts_container")); } } @Override protected String getLongPressIndicator() { Loading