Home
last modified time | relevance | path

Searched refs:mDevice (Results 1 – 25 of 118) sorted by relevance

12345

/platform_testing/tests/jank/sysapp_wear/src/com/android/wearable/sysapp/janktests/
DSysAppTestHelper.java55 private UiDevice mDevice = null; field in SysAppTestHelper
63 private SysAppTestHelper(UiDevice mDevice, Instrumentation instrumentation) { in SysAppTestHelper() argument
65 this.mDevice = mDevice; in SysAppTestHelper()
79 mDevice.swipe(50, in swipeRight()
80 mDevice.getDisplayHeight() / 2, mDevice.getDisplayWidth() - 25, in swipeRight()
81 mDevice.getDisplayHeight() / 2, 30); // slow speed in swipeRight()
86 mDevice.swipe(mDevice.getDisplayWidth() - 50, mDevice.getDisplayHeight() / 2, 50, in swipeLeft()
87 mDevice.getDisplayHeight() / 2, 30); // slow speed in swipeLeft()
92 mDevice.swipe(mDevice.getDisplayWidth() / 2, mDevice.getDisplayHeight() / 2 + 50, in swipeUp()
93 mDevice.getDisplayWidth() / 2, 0, 30); // slow speed in swipeUp()
[all …]
/platform_testing/tests/functional/overviewtests/src/com/android/overview/functional/
DMultiWindowTests.java52 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 …]
DOverviewHelper.java38 private UiDevice mDevice; field in OverviewHelper
44 this.mDevice = device; in OverviewHelper()
50 return mDevice.getLauncherPackageName(); in getLauncherPackage()
75 mDevice.pressRecentApps(); in navigateToRecents()
76 mDevice.waitForIdle(); in navigateToRecents()
77 return mDevice.wait(Until.findObject(By.res(RECENTS)), TIMEOUT); in navigateToRecents()
104 mDevice.swipe(r.width() / 2, top, r.width() / 2, bottom, 5); in scrollToTopOfRecents()
105 mDevice.waitForIdle(); in scrollToTopOfRecents()
116 mDevice.pressRecentApps(); in dockAppToTopMultiwindowSlot()
117 mDevice.waitForIdle(); in dockAppToTopMultiwindowSlot()
[all …]
DRecentsTests.java49 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/
DAospLauncherStrategy.java41 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 …]
DBaseLauncher3Strategy.java37 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 …]
DNexusLauncherStrategy.java98 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 …]
/platform_testing/tests/functional/calculator/src/com/android/calculator/functional/
DCalculatorTests.java36 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/libraries/launcher-helper/src/android/support/test/launcherhelper2/
DAospLauncherStrategy.java40 private UiDevice mDevice; field in AospLauncherStrategy
46 if (!mDevice.hasObject(getHotSeatSelector())) { in open()
47 mDevice.pressHome(); in open()
50 mDevice.wait(Until.hasObject(By.pkg(LAUNCHER_PKG)), 5000)); in open()
51 mDevice.waitForIdle(); in open()
54 UiObject2 cling = mDevice.findObject(By.res(LAUNCHER_PKG, "workspace_cling")); in open()
65 if (!mDevice.hasObject(APPS_CONTAINER)) { in openAllApps()
68 mDevice.findObject(By.desc("Apps")).click(); in openAllApps()
70 mDevice.wait(Until.gone(getHotSeatSelector()), 2000); in openAllApps()
71 mDevice.waitForIdle(); in openAllApps()
[all …]
DBaseLauncher3Strategy.java38 protected UiDevice mDevice; field in BaseLauncher3Strategy
43 mDevice = uiDevice; in setUiDevice()
50 if (!mDevice.hasObject(getHotSeatSelector())) { in open()
51 mDevice.pressHome(); in open()
53 if (!mDevice.wait(Until.hasObject(getHotSeatSelector()), 5000)) { in open()
57 mDevice.dumpWindowHierarchy(baos); in open()
69 mDevice.waitForIdle(); in open()
87 if (!mDevice.hasObject(getAllAppsSelector()) || reset) { in openAllApps()
89 mDevice.waitForIdle(); in openAllApps()
92 !mDevice.hasObject(getAllAppsSelector())); in openAllApps()
[all …]
DNexusLauncherStrategy.java90 mDevice.pressHome(); in open()
97 if (!mDevice.hasObject(getAllAppsSelector()) in openAllApps()
98 || mDevice.hasObject(getLauncherOverviewSelector()) in openAllApps()
102 mDevice.waitForIdle(); in openAllApps()
105 !mDevice.hasObject(getAllAppsSelector()) in openAllApps()
106 && !mDevice.hasObject(getLauncherOverviewSelector())); in openAllApps()
108 int midX = mDevice.getDisplayWidth() / 2; in openAllApps()
109 int height = mDevice.getDisplayHeight(); in openAllApps()
111 mDevice.swipe( in openAllApps()
119 UiObject2 hotseat = mDevice.wait(Until.findObject(getHotSeatSelector()), 2500); in openAllApps()
[all …]
/platform_testing/tests/jank/uibench_wear/src/com/android/wearable/uibench/janktests/
DUiBenchJankTestsHelper.java57 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 …]
DUiBenchJankTests.java44 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/
DSystemUiJankTests.java120 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 …]
/platform_testing/tests/perf/PerfTransitionTest/src/com/android/apptransition/tests/
DLatencyTests.java90 private UiDevice mDevice; field in LatencyTests
96 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp()
98 mDevice.executeShellCommand(ENABLE_LATENCY_TEST); in setUp()
105 mDevice.pressHome(); in setUp()
125 LauncherStrategyFactory.getInstance(mDevice); in setUp()
132 mDevice.executeShellCommand(RESET_ENABLE_LATENCY_TEST); in tearDown()
155 mDevice.waitForIdle(); in testExpandNotificationsLatency()
157 mDevice.waitForIdle(); in testExpandNotificationsLatency()
169 mDevice.swipe(mDevice.getDisplayWidth() / 2, in swipeDown()
170 0, mDevice.getDisplayWidth() / 2, in swipeDown()
[all …]
/platform_testing/tests/perf/BootHelperApp/src/com/android/boothelper/
DBootHelperTest.java48 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/libraries/system-helpers/sysui-helper/src/android/system/helpers/
DOverviewHelper.java52 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 …]
DLockscreenHelper.java69 private UiDevice mDevice = null; field in LockscreenHelper
77 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in LockscreenHelper()
92 return mDevice.getLauncherPackageName(); in getLauncherPackage()
101 mDevice.pressBack(); in launchCameraOnLockScreen()
103 int w = mDevice.getDisplayWidth(); in launchCameraOnLockScreen()
104 int h = mDevice.getDisplayHeight(); in launchCameraOnLockScreen()
106 mDevice.drag((w - 25), (h - 25), (int) (w * 0.5), (int) (w * 0.5), 40); in launchCameraOnLockScreen()
107 mDevice.waitForIdle(); in launchCameraOnLockScreen()
108 return mDevice.wait(Until.hasObject( in launchCameraOnLockScreen()
122 mDevice.wait(Until.findObject(By.text("None")), LONG_TIMEOUT * 2).click(); in setScreenLock()
[all …]
DQuickSettingsHelper.java58 @NonNull private final UiDevice mDevice; field in QuickSettingsHelper
64 this.mDevice = device; in QuickSettingsHelper()
132 UiObject2 quickSettingEdit = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu()
140 UiObject2 quickSettingTileObject = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu()
142 Point destination = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu()
154 mDevice.wait(Until.findObject(By.descContains("Navigate up")), LONG_TIMEOUT); in addQuickSettingTileFromEditMenu()
228 mDevice.pressHome(); in launchQuickSetting()
229 mDevice.openQuickSettings(); in launchQuickSetting()
233 mDevice.wait(Until.findObject(FOOTER_SELECTOR), SHORT_TIMEOUT); in launchQuickSetting()
236 mDevice.waitForIdle(LONG_TIMEOUT); in launchQuickSetting()
[all …]
/platform_testing/utils/dpad/src/android/platform/test/utils/
DDPadUtil2.java35 private UiDevice mDevice; field in DPadUtil2
39 mDevice = UiDevice.getInstance(instrumentation); in DPadUtil2()
43 mDevice = uiDevice; in DPadUtil2()
47 mDevice = uiDevice; in setUiDevice()
73 result = mDevice.pressDPadLeft(); in pressDPad()
76 result = mDevice.pressDPadRight(); in pressDPad()
79 result = mDevice.pressDPadUp(); in pressDPad()
82 result = mDevice.pressDPadDown(); in pressDPad()
126 boolean retVal = mDevice.pressKeyCode(keyCode); in pressKeyCodeAndWait()
129 mDevice.waitForIdle(); in pressKeyCodeAndWait()
[all …]
DDPadUtil.java36 private UiDevice mDevice; field in DPadUtil
40 mDevice = UiDevice.getInstance(instrumentation); in DPadUtil()
44 mDevice = uiDevice; in DPadUtil()
48 mDevice = uiDevice; in setUiDevice()
74 result = mDevice.pressDPadLeft(); in pressDPad()
77 result = mDevice.pressDPadRight(); in pressDPad()
80 result = mDevice.pressDPadUp(); in pressDPad()
83 result = mDevice.pressDPadDown(); in pressDPad()
127 boolean retVal = mDevice.pressKeyCode(keyCode); in pressKeyCodeAndWait()
130 mDevice.waitForIdle(); in pressKeyCodeAndWait()
[all …]
/platform_testing/tests/functional/notificationtests/src/com/android/notification/functional/
DNotificationInlineReplyTests.java42 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/tests/jank/touch_latency_wear/src/com/android/wearable/touch/janktests/
DTouchLatencyHelper.java49 private UiDevice mDevice = null; field in TouchLatencyHelper
56 private TouchLatencyHelper(UiDevice mDevice, Instrumentation instrumentation) { in TouchLatencyHelper() argument
57 this.mDevice = mDevice; in TouchLatencyHelper()
70 UiObject2 actionSettings = mDevice.wait(Until.findObject( in openBouncingBallActivity()
91 mDevice.pressBack(); in goBackHome()
98 mDevice.pressBack(); in goBackHome()
102 mDevice.pressBack(); in goBackHome()
106 mDevice.pressBack(); in goBackHome()
110 mDevice.pressBack(); in goBackHome()
116 String launcherPackageName = mDevice.getLauncherPackageName(); in waitForSysAppUiObject2()
[all …]
/platform_testing/tests/apphealth/scenarios/src/android/platform/test/scenario/facebook/
DFacebookAppHelperImpl.java61 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/
DApiDemoJankTests.java50 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 …]

12345