Loading tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +11 −0 Original line number Diff line number Diff line Loading @@ -373,6 +373,17 @@ public final class LauncherInstrumentation { sActiveContainer = new WeakReference<>(container); } /** * Sets the accesibility interactive timeout to be effectively indefinite (UI using this * accesibility timeout will not automatically dismiss if true). */ void setIndefiniteAccessibilityInteractiveUiTimeout(boolean indefiniteTimeout) { final String cmd = indefiniteTimeout ? "settings put secure accessibility_interactive_ui_timeout_ms 10000" : "settings delete secure accessibility_interactive_ui_timeout_ms"; logShellCommand(cmd); } public NavigationModel getNavigationModel() { final Context baseContext = mInstrumentation.getTargetContext(); try { Loading tests/tapl/com/android/launcher3/tapl/OverviewActions.java +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,8 @@ public class OverviewActions { try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "want to click screenshot button and exit screenshot ui")) { mLauncher.setIndefiniteAccessibilityInteractiveUiTimeout(true); UiObject2 screenshot = mLauncher.waitForObjectInContainer(mOverviewActions, "action_screenshot"); Loading @@ -62,6 +64,8 @@ public class OverviewActions { return new Overview(mLauncher); } } } finally { mLauncher.setIndefiniteAccessibilityInteractiveUiTimeout(false); } } Loading Loading
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +11 −0 Original line number Diff line number Diff line Loading @@ -373,6 +373,17 @@ public final class LauncherInstrumentation { sActiveContainer = new WeakReference<>(container); } /** * Sets the accesibility interactive timeout to be effectively indefinite (UI using this * accesibility timeout will not automatically dismiss if true). */ void setIndefiniteAccessibilityInteractiveUiTimeout(boolean indefiniteTimeout) { final String cmd = indefiniteTimeout ? "settings put secure accessibility_interactive_ui_timeout_ms 10000" : "settings delete secure accessibility_interactive_ui_timeout_ms"; logShellCommand(cmd); } public NavigationModel getNavigationModel() { final Context baseContext = mInstrumentation.getTargetContext(); try { Loading
tests/tapl/com/android/launcher3/tapl/OverviewActions.java +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,8 @@ public class OverviewActions { try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "want to click screenshot button and exit screenshot ui")) { mLauncher.setIndefiniteAccessibilityInteractiveUiTimeout(true); UiObject2 screenshot = mLauncher.waitForObjectInContainer(mOverviewActions, "action_screenshot"); Loading @@ -62,6 +64,8 @@ public class OverviewActions { return new Overview(mLauncher); } } } finally { mLauncher.setIndefiniteAccessibilityInteractiveUiTimeout(false); } } Loading