Home
last modified time | relevance | path

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

12345

/platform_testing/tests/functional/overviewtests/src/com/android/overview/functional/
DMultiWindowTests.java40 private UiDevice mDevice; field in MultiWindowTests
49 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
52 mDevice.setOrientationNatural(); in setUp()
53 mLauncherStrategy = LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy(); in setUp()
54 mOverviewHelper = new OverviewHelper(mDevice, getInstrumentation()); in setUp()
59 mDevice.pressHome(); in tearDown()
60 mDevice.unfreezeRotation(); in tearDown()
61 mDevice.waitForIdle(); in tearDown()
66 return mDevice.getLauncherPackageName(); in getLauncherPackage()
74 mDevice.click(mDevice.getDisplayHeight() * 3/4, mDevice.getDisplayWidth() / 2); in testDockingUndockingOnMultiwindow()
[all …]
DOverviewHelper.java40 private UiDevice mDevice; field in OverviewHelper
46 this.mDevice = device; in OverviewHelper()
52 return mDevice.getLauncherPackageName(); in getLauncherPackage()
77 mDevice.pressRecentApps(); in navigateToRecents()
78 mDevice.waitForIdle(); in navigateToRecents()
79 return mDevice.wait(Until.findObject(By.res(RECENTS)), TIMEOUT); in navigateToRecents()
106 mDevice.swipe(r.width() / 2, top, r.width() / 2, bottom, 5); in scrollToTopOfRecents()
107 mDevice.waitForIdle(); in scrollToTopOfRecents()
118 mDevice.pressRecentApps(); in dockAppToTopMultiwindowSlot()
119 mDevice.waitForIdle(); in dockAppToTopMultiwindowSlot()
[all …]
DRecentsTests.java37 private UiDevice mDevice; field in RecentsTests
45 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
47 mDevice.setOrientationNatural(); in setUp()
48 mLauncherStrategy = LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy(); in setUp()
49 mOverviewHelper = new OverviewHelper(mDevice, getInstrumentation()); in setUp()
54 mDevice.pressHome(); in tearDown()
55 mDevice.unfreezeRotation(); in tearDown()
56 mDevice.waitForIdle(); in tearDown()
72 UiObject2 dismissCalculator = mDevice.wait(Until.findObject in testAddAndDismissItemInRecents()
76 mDevice.waitForIdle(); in testAddAndDismissItemInRecents()
[all …]
/platform_testing/tests/functional/calculator/src/com/android/calculator/functional/
DCalculatorTests.java33 private UiDevice mDevice = null; field in CalculatorTests
39 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
41 mDevice.setOrientationNatural(); in setUp()
42 mDevice.pressHome(); in setUp()
43 mCalculatorHelper = CalculatorHelper.getInstance(mDevice, mContext); in setUp()
48 mDevice.pressHome(); in tearDown()
49 mDevice.unfreezeRotation(); in tearDown()
56 mDevice.waitForIdle(); in launchCalculator()
65 mDevice.waitForIdle(); in testAdd()
66 mDevice.pressBack(); in testAdd()
[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 …]
DWearLauncherStrategy.java37 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/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 …]
DWearLauncherStrategy.java38 protected UiDevice mDevice; field in WearLauncherStrategy
50 mDevice = uiDevice; in setUiDevice()
56 if (!mDevice.hasObject(getHotSeatSelector())) { in open()
57 mDevice.pressHome(); in open()
58 if (!mDevice.wait(Until.hasObject(getHotSeatSelector()), 5000)) { in open()
62 mDevice.waitForIdle(); in open()
74 if (!mDevice.hasObject(getAllAppsSelector())) { in openAllApps()
75 mDevice.pressHome(); in openAllApps()
76 mDevice.waitForIdle(); in openAllApps()
77 if (!mDevice.wait(Until.hasObject(getAllAppsSelector()), 5000)) { 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 …]
DSettingsJankTests.java56 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/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/libraries/system-helpers/sysui-helper/src/android/system/helpers/
DLockscreenHelper.java74 private UiDevice mDevice = null; field in LockscreenHelper
82 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in LockscreenHelper()
97 return mDevice.getLauncherPackageName(); in getLauncherPackage()
106 mDevice.pressBack(); in launchCameraOnLockScreen()
108 int w = mDevice.getDisplayWidth(); in launchCameraOnLockScreen()
109 int h = mDevice.getDisplayHeight(); in launchCameraOnLockScreen()
111 mDevice.drag((w - 25), (h - 25), (int) (w * 0.5), (int) (w * 0.5), 40); in launchCameraOnLockScreen()
112 mDevice.waitForIdle(); in launchCameraOnLockScreen()
113 return mDevice.wait(Until.hasObject( in launchCameraOnLockScreen()
127 mDevice.wait(Until.findObject(By.text("None")), LONG_TIMEOUT * 2).click(); in setScreenLock()
[all …]
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 …]
DQuickSettingsHelper.java59 @NonNull private final UiDevice mDevice; field in QuickSettingsHelper
66 this.mDevice = device; in QuickSettingsHelper()
135 UiObject2 quickSettingEdit = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu()
143 UiObject2 quickSettingTileObject = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu()
145 Point destination = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu()
157 mDevice.wait(Until.findObject(By.descContains("Navigate up")), LONG_TIMEOUT); in addQuickSettingTileFromEditMenu()
233 mDevice.pressHome(); in launchQuickSetting()
234 mDevice.openQuickSettings(); in launchQuickSetting()
238 mDevice.wait(Until.findObject(FOOTER_SELECTOR), SHORT_TIMEOUT); in launchQuickSetting()
241 mDevice.waitForIdle(LONG_TIMEOUT); in launchQuickSetting()
[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/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/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