/platform_testing/tests/jank/sysapp_wear/src/com/android/wearable/sysapp/janktests/ |
D | SysAppTestHelper.java | 53 private UiDevice mDevice = null; field in SysAppTestHelper 61 private SysAppTestHelper(UiDevice mDevice, Instrumentation instrumentation) { in SysAppTestHelper() argument 63 this.mDevice = mDevice; in SysAppTestHelper() 77 mDevice.swipe(50, in swipeRight() 78 mDevice.getDisplayHeight() / 2, mDevice.getDisplayWidth() - 25, in swipeRight() 79 mDevice.getDisplayHeight() / 2, 30); // slow speed in swipeRight() 84 mDevice.swipe(mDevice.getDisplayWidth() - 50, mDevice.getDisplayHeight() / 2, 50, in swipeLeft() 85 mDevice.getDisplayHeight() / 2, 30); // slow speed in swipeLeft() 90 mDevice.swipe(mDevice.getDisplayWidth() / 2, mDevice.getDisplayHeight() / 2 + 50, in swipeUp() 91 mDevice.getDisplayWidth() / 2, 0, 30); // slow speed in swipeUp() [all …]
|
/platform_testing/tests/functional/overviewtests/src/com/android/overview/functional/ |
D | MultiWindowTests.java | 52 private UiDevice mDevice; field in MultiWindowTests 61 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 64 mDevice.setOrientationNatural(); in setUp() 65 mLauncherStrategy = LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy(); in setUp() 66 mOverviewHelper = new OverviewHelper(mDevice, getInstrumentation()); in setUp() 71 mDevice.pressHome(); in tearDown() 72 mDevice.unfreezeRotation(); in tearDown() 73 mDevice.waitForIdle(); in tearDown() 78 return mDevice.getLauncherPackageName(); in getLauncherPackage() 86 mDevice.click(mDevice.getDisplayHeight() * 3/4, mDevice.getDisplayWidth() / 2); in testDockingUndockingOnMultiwindow() [all …]
|
D | OverviewHelper.java | 49 private UiDevice mDevice; field in OverviewHelper 55 this.mDevice = device; in OverviewHelper() 61 return mDevice.getLauncherPackageName(); in getLauncherPackage() 86 mDevice.pressRecentApps(); in navigateToRecents() 87 mDevice.waitForIdle(); in navigateToRecents() 88 return mDevice.wait(Until.findObject(By.res(RECENTS)), TIMEOUT); in navigateToRecents() 115 mDevice.swipe(r.width() / 2, top, r.width() / 2, bottom, 5); in scrollToTopOfRecents() 116 mDevice.waitForIdle(); in scrollToTopOfRecents() 127 mDevice.pressRecentApps(); in dockAppToTopMultiwindowSlot() 128 mDevice.waitForIdle(); in dockAppToTopMultiwindowSlot() [all …]
|
D | RecentsTests.java | 49 private UiDevice mDevice; field in RecentsTests 57 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 59 mDevice.setOrientationNatural(); in setUp() 60 mLauncherStrategy = LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy(); in setUp() 61 mOverviewHelper = new OverviewHelper(mDevice, getInstrumentation()); in setUp() 66 mDevice.pressHome(); in tearDown() 67 mDevice.unfreezeRotation(); in tearDown() 68 mDevice.waitForIdle(); in tearDown() 84 UiObject2 dismissCalculator = mDevice.wait(Until.findObject in testAddAndDismissItemInRecents() 88 mDevice.waitForIdle(); in testAddAndDismissItemInRecents() [all …]
|
/platform_testing/libraries/launcher-helper/src/android/support/test/launcherhelper/ |
D | AospLauncherStrategy.java | 41 private UiDevice mDevice; field in AospLauncherStrategy 49 if (!mDevice.hasObject(getHotSeatSelector())) { in open() 50 mDevice.pressHome(); in open() 52 mDevice.wait(Until.hasObject(By.pkg(LAUNCHER_PKG)), 5000)); in open() 53 mDevice.waitForIdle(); in open() 56 UiObject2 cling = mDevice.findObject(By.res(LAUNCHER_PKG, "workspace_cling")); in open() 69 if (!mDevice.hasObject(APPS_CONTAINER)) { in openAllApps() 72 mDevice.findObject(By.desc("Apps")).click(); in openAllApps() 74 mDevice.wait(Until.gone(getHotSeatSelector()), 2000); in openAllApps() 75 mDevice.waitForIdle(); in openAllApps() [all …]
|
D | BaseLauncher3Strategy.java | 37 protected UiDevice mDevice; field in BaseLauncher3Strategy 44 mDevice = uiDevice; in setUiDevice() 53 if (!mDevice.hasObject(getHotSeatSelector())) { in open() 54 mDevice.pressHome(); in open() 56 if (!mDevice.wait(Until.hasObject(getHotSeatSelector()), 5000)) { in open() 60 mDevice.dumpWindowHierarchy(baos); in open() 72 mDevice.waitForIdle(); in open() 94 if (!mDevice.hasObject(getAllAppsSelector()) || reset) { in openAllApps() 96 mDevice.waitForIdle(); in openAllApps() 99 !mDevice.hasObject(getAllAppsSelector())); in openAllApps() [all …]
|
D | NexusLauncherStrategy.java | 98 mDevice.pressHome(); in open() 107 if (!mDevice.hasObject(getAllAppsSelector()) || mDevice.hasObject( in openAllApps() 111 mDevice.waitForIdle(); in openAllApps() 113 !mDevice.hasObject(getAllAppsSelector()) && !mDevice.hasObject( in openAllApps() 116 int midX = mDevice.getDisplayWidth() / 2; in openAllApps() 117 int height = mDevice.getDisplayHeight(); in openAllApps() 119 mDevice.swipe( in openAllApps() 127 UiObject2 hotseat = mDevice.wait(Until.findObject(getHotSeatSelector()), 2500); in openAllApps() 129 int endY = (int) (mDevice.getDisplayHeight() * 0.1f); in openAllApps() 130 mDevice.swipe( in openAllApps() [all …]
|
D | WearLauncherStrategy.java | 37 protected UiDevice mDevice; field in WearLauncherStrategy 53 mDevice = uiDevice; in setUiDevice() 61 if (!mDevice.hasObject(getHotSeatSelector())) { in open() 62 mDevice.pressHome(); in open() 63 if (!mDevice.wait(Until.hasObject(getHotSeatSelector()), 5000)) { in open() 67 mDevice.waitForIdle(); in open() 78 if (!mDevice.hasObject(getAllAppsSelector())) { in openAllApps() 79 mDevice.pressHome(); in openAllApps() 80 mDevice.waitForIdle(); in openAllApps() 81 if (!mDevice.wait(Until.hasObject(getAllAppsSelector()), 5000)) { in openAllApps() [all …]
|
/platform_testing/tests/functional/calculator/src/com/android/calculator/functional/ |
D | CalculatorTests.java | 36 private UiDevice mDevice = null; field in CalculatorTests 42 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 44 mDevice.setOrientationNatural(); in setUp() 45 mDevice.pressHome(); in setUp() 46 mCalculatorHelper = CalculatorHelper.getInstance(mDevice, mContext); in setUp() 51 mDevice.pressHome(); in tearDown() 52 mDevice.unfreezeRotation(); in tearDown() 59 mDevice.waitForIdle(); in launchCalculator() 68 mDevice.waitForIdle(); in testAdd() 69 mDevice.pressBack(); in testAdd() [all …]
|
/platform_testing/tests/jank/uibench_wear/src/com/android/wearable/uibench/janktests/ |
D | UiBenchJankTestsHelper.java | 57 private UiDevice mDevice; field in UiBenchJankTestsHelper 61 mDevice = device; in UiBenchJankTestsHelper() 82 mDevice.waitForIdle(); in launchUiBench() 84 UiObject2 initScreen = mDevice.wait(Until.findObject(By.text(UIBENCH_OBJECT_NAME)), 2000); in launchUiBench() 87 mDevice.pressBack(); in launchUiBench() 88 initScreen = mDevice.wait(Until.findObject(By.text(UIBENCH_OBJECT_NAME)), 2000); in launchUiBench() 94 String launcherPackage = mDevice.getLauncherPackageName(); in goBackHome() 95 UiObject2 homeScreen = mDevice.findObject(By.res(launcherPackage, ROOT_NAME)); in goBackHome() 98 mDevice.pressBack(); in goBackHome() 99 homeScreen = mDevice.findObject(By.res(launcherPackage, ROOT_NAME)); in goBackHome() [all …]
|
D | UiBenchJankTests.java | 44 private UiDevice mDevice; field in UiBenchJankTests 50 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 51 mHelper = UiBenchJankTestsHelper.getInstance(mDevice, in setUp() 53 mDevice.wakeUp(); in setUp() 78 UiObject2 fullscreenOverdrawScreen = mDevice.wait(Until.findObject( in testFullscreenOverdraw() 106 UiObject2 invalidateScreen = mDevice.wait(Until.findObject( in testInvalidate() 122 UiObject2 trivialAnimationScreen = mDevice.wait(Until.findObject( in testTrivialAnimation() 138 UiObject2 trivialListViewContents = mDevice.wait(Until.findObject( in testTrivialListViewFling() 141 trivialListViewContents.setGestureMargins(mDevice.getDisplayWidth() / 2 - 40, in testTrivialListViewFling() 142 mDevice.getDisplayHeight() / 2 + 100, in testTrivialListViewFling() [all …]
|
/platform_testing/tests/jank/UbSystemUiJankTests/src/android/platform/systemui/tests/jank/ |
D | SystemUiJankTests.java | 120 private UiDevice mDevice; field in SystemUiJankTests 128 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 130 mDevice.setOrientationNatural(); in setUp() 139 LauncherStrategyFactory.getInstance(mDevice); in setUp() 150 mDevice.executeShellCommand("pm disable com.google.android.music"); in setUp() 154 mDevice.pressHome(); in goHome() 155 mDevice.waitForIdle(); in goHome() 160 mDevice.executeShellCommand("pm enable com.google.android.music"); in tearDown() 161 mDevice.unfreezeRotation(); in tearDown() 187 mDevice.wakeUp(); in resetRecents() [all …]
|
D | SettingsJankTests.java | 56 private UiDevice mDevice; field in SettingsJankTests 60 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 63 mDevice.setOrientationNatural(); in setUp() 68 mDevice.pressHome(); in setUp() 69 mDevice.waitForIdle(); in setUp() 76 mDevice.wait(Until.hasObject(By.pkg(SETTINGS_PACKAGE).depth(0)), TIMEOUT); in setUp() 82 mDevice.unfreezeRotation(); in tearDown() 87 UiObject2 list = mDevice.wait(Until.findObject(SETTINGS_DASHBOARD), TIMEOUT); in flingSettingsToStart() 91 mDevice.wait(Until.findObject(By.text("SEE ALL")), TIMEOUT).click(); in flingSettingsToStart() 92 list = mDevice.wait(Until.findObject(SETTINGS_DASHBOARD), TIMEOUT); in flingSettingsToStart() [all …]
|
/platform_testing/libraries/system-helpers/sysui-helper/src/android/system/helpers/ |
D | LockscreenHelper.java | 64 private UiDevice mDevice = null; field in LockscreenHelper 72 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in LockscreenHelper() 87 return mDevice.getLauncherPackageName(); in getLauncherPackage() 96 mDevice.pressBack(); in launchCameraOnLockScreen() 98 int w = mDevice.getDisplayWidth(); in launchCameraOnLockScreen() 99 int h = mDevice.getDisplayHeight(); in launchCameraOnLockScreen() 101 mDevice.drag((w - 25), (h - 25), (int) (w * 0.5), (int) (w * 0.5), 40); in launchCameraOnLockScreen() 102 mDevice.waitForIdle(); in launchCameraOnLockScreen() 103 return mDevice.wait(Until.hasObject( in launchCameraOnLockScreen() 117 mDevice.wait(Until.findObject(By.text("None")), LONG_TIMEOUT * 2).click(); in setScreenLock() [all …]
|
D | QuickSettingsHelper.java | 35 private UiDevice mDevice = null; field in QuickSettingsHelper 42 this.mDevice = device; in QuickSettingsHelper() 84 UiObject2 quickSettingEdit = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu() 92 UiObject2 quickSettingTileObject = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu() 94 Point destination = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu() 106 mDevice.wait(Until.findObject(By.descContains("Navigate up")), LONG_TIMEOUT); in addQuickSettingTileFromEditMenu() 128 mDevice.pressHome(); in launchQuickSetting() 135 mDevice.swipe(mDevice.getDisplayWidth() / 2, mDevice.getDisplayHeight(), in swipeUp() 136 mDevice.getDisplayWidth() / 2, 0, 30); in swipeUp() 141 mDevice.swipe(mDevice.getDisplayWidth() / 2, 0, mDevice.getDisplayWidth() / 2, in swipeDown() [all …]
|
D | OverviewHelper.java | 52 private UiDevice mDevice = null; field in OverviewHelper 59 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in OverviewHelper() 78 mDevice.pressRecentApps(); in navigateToRecents() 79 mDevice.waitForIdle(); in navigateToRecents() 80 return mDevice.wait(Until.findObject(By.res(RECENTS)), TIMEOUT); in navigateToRecents() 129 while (mDevice.hasObject(By.textContains("has stopped"))) { in populateManyRecentApps() 130 UiObject2 crashDialog = mDevice.findObject(By.text("Close")); in populateManyRecentApps() 153 mDevice.swipe(r.width() / 2, top, r.width() / 2, bottom, 5); in scrollToTopOfRecents() 154 mDevice.waitForIdle(); in scrollToTopOfRecents() 165 mDevice.pressRecentApps(); in dockAppToTopMultiwindowSlot() [all …]
|
/platform_testing/tests/perf/PerfTransitionTest/src/com/android/apptransition/tests/ |
D | LatencyTests.java | 83 private UiDevice mDevice; field in LatencyTests 89 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 93 mDevice.pressHome(); in setUp() 113 LauncherStrategyFactory.getInstance(mDevice); in setUp() 134 mDevice.waitForIdle(); in testExpandNotificationsLatency() 136 mDevice.waitForIdle(); in testExpandNotificationsLatency() 148 mDevice.swipe(mDevice.getDisplayWidth() / 2, in swipeDown() 149 0, mDevice.getDisplayWidth() / 2, in swipeDown() 150 mDevice.getDisplayHeight() / 2, in swipeDown() 155 mDevice.swipe(mDevice.getDisplayWidth() / 2, in swipeUp() [all …]
|
/platform_testing/tests/perf/BootHelperApp/src/com/android/boothelper/ |
D | BootHelperTest.java | 48 private UiDevice mDevice; field in BootHelperTest 53 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 62 mDevice.waitForIdle(); in setupLockScreenPin() 68 mDevice.waitForIdle(); in setupLockScreenPin() 82 mDevice.pressBack(); in setupLockScreenPin() 101 mDevice.wakeUp(); in dismissKeyguard() 102 mDevice.waitForIdle(); in dismissKeyguard() 103 mDevice.pressMenu(); in dismissKeyguard() 104 mDevice.waitForIdle(); in dismissKeyguard() 109 mDevice.waitForIdle(); in enterTestPin() [all …]
|
/platform_testing/tests/functional/notificationtests/src/com/android/notification/functional/ |
D | NotificationInlineReplyTests.java | 42 private UiDevice mDevice = null; field in NotificationInlineReplyTests 49 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 53 mHelper = new NotificationHelper(mDevice, getInstrumentation(), mNotificationManager); in setUp() 55 mDevice.setOrientationNatural(); in setUp() 59 mDevice.pressHome(); in setUp() 66 mDevice.pressHome(); in tearDown() 75 UiObject2 obj = mDevice.wait(Until.findObject(By.text("INLINE REPLY TEST")), in testInLineNotificationWithLockScreen() 77 mDevice.swipe(obj.getVisibleBounds().centerX(), obj.getVisibleBounds().centerY(), in testInLineNotificationWithLockScreen() 79 mDevice.getDisplayHeight(), 5); in testInLineNotificationWithLockScreen() 80 mDevice.wait(Until.findObject(By.text("Reply")), LONG_TIMEOUT).click(); in testInLineNotificationWithLockScreen() [all …]
|
/platform_testing/utils/dpad/src/android/platform/test/utils/ |
D | DPadUtil.java | 34 private UiDevice mDevice; field in DPadUtil 38 mDevice = UiDevice.getInstance(instrumentation); in DPadUtil() 42 mDevice = uiDevice; in DPadUtil() 46 mDevice = uiDevice; in setUiDevice() 72 result = mDevice.pressDPadLeft(); in pressDPad() 75 result = mDevice.pressDPadRight(); in pressDPad() 78 result = mDevice.pressDPadUp(); in pressDPad() 81 result = mDevice.pressDPadDown(); in pressDPad() 125 boolean retVal = mDevice.pressKeyCode(keyCode); in pressKeyCodeAndWait() 128 mDevice.waitForIdle(); in pressKeyCodeAndWait() [all …]
|
/platform_testing/tests/jank/touch_latency_wear/src/com/android/wearable/touch/janktests/ |
D | TouchLatencyHelper.java | 47 private UiDevice mDevice = null; field in TouchLatencyHelper 54 private TouchLatencyHelper(UiDevice mDevice, Instrumentation instrumentation) { in TouchLatencyHelper() argument 55 this.mDevice = mDevice; in TouchLatencyHelper() 68 UiObject2 actionSettings = mDevice.wait(Until.findObject( in openBouncingBallActivity() 89 mDevice.pressBack(); in goBackHome() 96 mDevice.pressBack(); in goBackHome() 100 mDevice.pressBack(); in goBackHome() 104 mDevice.pressBack(); in goBackHome() 108 mDevice.pressBack(); in goBackHome() 114 String launcherPackageName = mDevice.getLauncherPackageName(); in waitForSysAppUiObject2() [all …]
|
/platform_testing/tests/apphealth/scenarios/src/android/platform/test/scenario/facebook/ |
D | FacebookAppHelperImpl.java | 61 private UiDevice mDevice; field in FacebookAppHelperImpl 67 mDevice = UiDevice.getInstance(instrumentation); in FacebookAppHelperImpl() 75 mDevice.wait(Until.findObject(By.text(OK_BUTTON_DESC)), LONG_TIMEOUT); in dismissInitialDialogs() 81 mDevice.wait(Until.findObject(By.text(GENERIC_ALLOW_TEXT)), LONG_TIMEOUT); in dismissInitialDialogs() 84 mDevice.waitForIdle(); in dismissInitialDialogs() 87 mDevice.wait(Until.findObject(By.text(WHILE_USING_APP_TEXT)), LONG_TIMEOUT); in dismissInitialDialogs() 90 mDevice.waitForIdle(); in dismissInitialDialogs() 95 mDevice.wait(Until.findObject(By.text(REMIND_ME_LATER_TEXT)), LONG_TIMEOUT); in dismissInitialDialogs() 98 mDevice.waitForIdle(); in dismissInitialDialogs() 102 mDevice.wait(Until.findObject(By.desc(DENY_BUTTON_DESC)), LONG_TIMEOUT); in dismissInitialDialogs() [all …]
|
/platform_testing/tests/jank/jankmicrobenchmark/src/com/android/jankmicrobenchmark/janktests/ |
D | ApiDemoJankTests.java | 50 private UiDevice mDevice; field in ApiDemoJankTests 56 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 57 mDevice.setOrientationNatural(); in setUp() 58 LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy().open(); in setUp() 63 mDevice.unfreezeRotation(); in tearDown() 70 if (mDevice.getProductName().equals("fugu")) { in getHomeScreen() 71 return mDevice.wait(Until.findObject(By.res(LEANBACK_LAUNCHER, "main_list_view")), in getHomeScreen() 75 String launcherPackage = mDevice.getLauncherPackageName(); in getHomeScreen() 76 return mDevice.wait(Until.findObject(By.res(launcherPackage,"workspace")), in getHomeScreen() 89 mDevice.waitForIdle(); in launchApiDemos() [all …]
|
/platform_testing/tests/health/scenarios/src/android/platform/test/scenario/system/ |
D | ScreenOff.java | 44 private UiDevice mDevice; field in ScreenOff 48 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 53 mDevice.sleep(); in testScreenOff() 62 mDevice.pressMenu(); in tearDown() 63 mDevice.waitForIdle(); in tearDown() 65 mDevice.pressMenu(); in tearDown() 66 mDevice.waitForIdle(); in tearDown()
|
/platform_testing/libraries/app-helpers/core/src/android/platform/helpers/ |
D | AbstractStandardAppHelper.java | 65 public UiDevice mDevice; field in AbstractStandardAppHelper 77 mDevice = UiDevice.getInstance(instr); in AbstractStandardAppHelper() 106 if (!mDevice.isScreenOn()) { in open() 107 mDevice.wakeUp(); in open() 113 if (mDevice.hasObject(By.res("com.android.systemui", "keyguard_bottom_area"))) { in open() 114 mDevice.pressMenu(); in open() 115 mDevice.waitForIdle(); in open() 134 if (!mDevice.hasObject(By.pkg(pkg).depth(0))) { in open() 141 if (!mDevice.wait(Until.hasObject(By.pkg(pkg).depth(0)), mLaunchTimeout)) { in open() 185 mDevice.pressHome(); in exit() [all …]
|