Home
last modified time | relevance | path

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

12345678

/cts/helpers/default/src/com/android/cts/helpers/aosp/
DDefaultCtsPrintHelper.java46 protected UiDevice mDevice; field in DefaultCtsPrintHelper
51 mDevice = UiDevice.getInstance(mInstrumentation); in DefaultCtsPrintHelper()
69 mDevice.dumpWindowHierarchy(os); in dumpWindowHierarchy()
84 mDevice.freezeRotation(); in setUp()
85 while (!mDevice.isNaturalOrientation()) { in setUp()
86 mDevice.setOrientationNatural(); in setUp()
87 mDevice.waitForIdle(); in setUp()
98 mDevice.unfreezeRotation(); in tearDown()
108 mDevice.waitForIdle(); in submitPrintJob()
111 mDevice.wait( in submitPrintJob()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/
DSettingsPanelTest.java65 private UiDevice mDevice; field in SettingsPanelTest
70 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp()
94 mDevice.pressHome(); in cleanUp()
95 mDevice.wait(Until.hasObject(By.pkg(mLauncherPackage).depth(0)), TIMEOUT); in cleanUp()
105 String currentPackage = mDevice.getCurrentPackageName(); in volumePanel_correctPackage()
114 String currentPackage = mDevice.getCurrentPackageName(); in nfcPanel_correctPackage()
123 String currentPackage = mDevice.getCurrentPackageName(); in wifiPanel_correctPackage()
133 String currentPackage = mDevice.getCurrentPackageName(); in volumePanel_doneClosesPanel()
140 currentPackage = mDevice.getCurrentPackageName(); in volumePanel_doneClosesPanel()
148 String currentPackage = mDevice.getCurrentPackageName(); in nfcPanel_doneClosesPanel()
[all …]
/cts/hostsidetests/calllog/app/src/android/provider/cts/contacts/testapp/
DCallLogDirectBootTest.java37 private UiDevice mDevice; field in CallLogDirectBootTest
46 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
47 assertNotNull(mDevice); in setUp()
134 mDevice.waitForIdle(); in enterTestPin()
135 mDevice.pressKeyCode(KeyEvent.KEYCODE_1); in enterTestPin()
136 mDevice.pressKeyCode(KeyEvent.KEYCODE_2); in enterTestPin()
137 mDevice.pressKeyCode(KeyEvent.KEYCODE_3); in enterTestPin()
138 mDevice.pressKeyCode(KeyEvent.KEYCODE_4); in enterTestPin()
139 mDevice.pressKeyCode(KeyEvent.KEYCODE_5); in enterTestPin()
140 mDevice.waitForIdle(); in enterTestPin()
[all …]
/cts/hostsidetests/securitybulletin/src/android/security/cts/
DTestLocationScanningServicesUsingSlices.java39 private ITestDevice mDevice = null; field in TestLocationScanningServicesUsingSlices
44 mDevice = getDevice(); in setUp()
51 mDevice.setDeviceOwner( in setUp()
52 mTestPkg + "/.PocDeviceAdminReceiver", mDevice.getCurrentUser())); in setUp()
61 mDevice.removeAdmin(mTestPkg + "/.PocDeviceAdminReceiver", mDevice.getCurrentUser()); in tearDown()
62 AdbUtils.runCommandLine("input keyevent KEYCODE_HOME", mDevice); in tearDown()
75 withSetting(mDevice, "global", "ble_scan_always_enabled", "0")) { in testPocCVE_2023_21247()
89 withSetting(mDevice, "global", "wifi_scan_always_enabled", "0")) { in testPocCVE_2023_21248()
DCVE_2022_20501.java33 private ITestDevice mDevice; field in CVE_2022_20501
46 mDevice = getDevice(); in testPocCVE_2022_20501()
51 mDevice); in testPocCVE_2022_20501()
54 "pm grant " + testPkg + " android.permission.SYSTEM_ALERT_WINDOW", mDevice); in testPocCVE_2022_20501()
64 AdbUtils.runCommandLine("input keyevent KEYCODE_HOME", mDevice); in tearDown()
/cts/hostsidetests/webkit/src/com/android/cts/webkit/
DWebViewHostSideMultipleProfileTest.java57 private ITestDevice mDevice; field in WebViewHostSideMultipleProfileTest
64 mDevice = getDevice(); in setUp()
65 mInitialUserId = mDevice.getCurrentUser(); in setUp()
71 Assert.assertTrue(mDevice.switchUser(mInitialUserId)); in tearDown()
112 String output = mDevice.installPackageForUser(file, true, false, userId, "--dont-kill"); in installTestApkForUser()
128 command = String.format(command, mDevice.getMainUserId(), profileName); in createUser()
130 CommandResult output = mDevice.executeShellV2Command(command); in createUser()
143 if (!mDevice.startUser(userId)) { in startUser()
144 mDevice.removeUser(userId); in startUser()
150 if (!mDevice.switchUser(userId)) { in switchUser()
[all …]
/cts/hostsidetests/backup/src/android/cts/backup/
DBaseMultiUserBackupHostSideTest.java61 private ITestDevice mDevice; field in BaseMultiUserBackupHostSideTest
70 mDevice = getDevice(); in setUp()
74 assumeTrue("Multi-user feature not supported", mDevice.isMultiUserSupported()); in setUp()
77 int currentUserId = mDevice.getCurrentUser(); in setUp()
81 int primaryUserId = mDevice.getPrimaryUserId(); in setUp()
83 mDevice.switchUser(primaryUserId); in setUp()
91 mDevice.switchUser(mInitialUser.get()); in tearDown()
116 boolean startSuccessful = mDevice.startUser(userId, /* wait for RUNNING_UNLOCKED */ true); in startUser()
119 mDevice.setSetting(userId, "secure", USER_SETUP_COMPLETE_SETTING, "1"); in startUser()
161 String output = mDevice.executeShellCommand("bmgr --user " + userId + " list transports"); in userHasBackupTransport()
[all …]
DBackupPreparer.java70 private ITestDevice mDevice; field in BackupPreparer
76 mDevice = device; in setUp()
77 mBackupUtils = BackupHostSideUtils.createBackupUtils(mDevice); in setUp()
78 mIsBackupSupported = mDevice.hasFeature("feature:" + FEATURE_BACKUP); in setUp()
85 BackupHostSideUtils.checkSetupComplete(mDevice); in setUp()
95 CLog.i("Enabling backup on %s", mDevice.getSerialNumber()); in setUp()
99 CLog.i("Selecting local transport on %s", mDevice.getSerialNumber()); in setUp()
115 mDevice = device; in tearDown()
120 mDevice.getSerialNumber()); in tearDown()
124 mDevice.getSerialNumber()); in tearDown()
[all …]
/cts/common/host-side/util-axt/src/com/android/compatibility/common/util/
DLocationModeSetter.java31 private final ITestDevice mDevice; field in LocationModeSetter
34 mDevice = device; in LocationModeSetter()
35 mOldLocationSetting = mDevice.getSetting(SETTINGS_SECURE, LOCATION_MODE); in LocationModeSetter()
40 mDevice.setSetting(SETTINGS_SECURE, LOCATION_MODE, LOCATION_MODE_HIGH_ACCURACY); in setLocationEnabled()
42 mDevice.setSetting(SETTINGS_SECURE, LOCATION_MODE, LOCATION_MODE_OFF); in setLocationEnabled()
48 mDevice.setSetting(SETTINGS_SECURE, LOCATION_MODE, mOldLocationSetting); in close()
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DLocationModeSetter.java33 private final ITestDevice mDevice; field in LocationModeSetter
36 mDevice = device; in LocationModeSetter()
37 mOldLocationSetting = mDevice.getSetting(SETTINGS_SECURE, LOCATION_MODE); in LocationModeSetter()
42 mDevice.setSetting(SETTINGS_SECURE, LOCATION_MODE, LOCATION_MODE_HIGH_ACCURACY); in setLocationEnabled()
44 mDevice.setSetting(SETTINGS_SECURE, LOCATION_MODE, LOCATION_MODE_OFF); in setLocationEnabled()
50 mDevice.setSetting(SETTINGS_SECURE, LOCATION_MODE, mOldLocationSetting); in close()
/cts/hostsidetests/os/src/android/os/cts/
DPowerManagerTests.java56 private ITestDevice mDevice; field in PowerManagerTests
60 mDevice = getDevice(); in setUp()
73 mDevice.executeShellCommand("input keyevent 26; input keyevent 82"); in testCachedProcessReleasesWakeLock()
77 String processes = mDevice.executeShellCommand(CHECK_CACHED_CMD); in testCachedProcessReleasesWakeLock()
80 String wakelocks = mDevice.executeShellCommand(GET_WAKE_LOCKS_CMD); in testCachedProcessReleasesWakeLock()
87 mDevice.executeShellCommand("am make-uid-idle " + PACKAGE_NAME); in testCachedProcessReleasesWakeLock()
89 wakelocks = mDevice.executeShellCommand(GET_WAKE_LOCKS_CMD); in testCachedProcessReleasesWakeLock()
99 mDevice.executeShellCommand(String.format(startAppTemplate, packageName)); in makeCachedProcess()
101 mDevice.executeShellCommand(String.format(viewUriTemplate, "mailto:")); in makeCachedProcess()
102 mDevice.executeShellCommand(String.format(viewUriTemplate, "tel:")); in makeCachedProcess()
DQuiescentBootTests.java52 private ITestDevice mDevice; field in QuiescentBootTests
56 mDevice = getDevice(); in setUp()
59 (PropertyUtil.getFirstApiLevel(mDevice) < 30)); in setUp()
65 mDevice.executeShellCommand(CMD_INPUT_WAKEUP); in tearDown()
71 mDevice.reboot(REBOOT_REASON_QUIESCENT); in testQuiescentBoot_asleep()
77 mDevice.reboot(REBOOT_REASON_QUIESCENT); in testQuiescentBoot_wakesUpWithPowerButton()
78 mDevice.executeShellCommand(CMD_INPUT_POWER); in testQuiescentBoot_wakesUpWithPowerButton()
85 mDevice.reboot(REBOOT_REASON_QUIESCENT); in testQuiescentBoot_asleepAfterQuiescentReboot()
91 mDevice.reboot(REBOOT_REASON_QUIESCENT); in testQuiescentBoot_activitiesNotResumedAfterBoot()
DOsHostTests.java57 private ITestDevice mDevice; field in OsHostTests
76 mDevice = getDevice(); in setUp()
87 boolean wasRoot = mDevice.isAdbRoot(); in testNonExportedActivities()
89 mDevice.disableAdbRoot(); in testNonExportedActivities()
92 mDevice.executeShellCommand(START_NON_EXPORTED_ACTIVITY_COMMAND, outputReceiver); in testNonExportedActivities()
99 mDevice.enableAdbRoot(); in testNonExportedActivities()
112 mDevice.clearLogcat(); in testForegroundServiceBadNotification()
113 mDevice.executeShellCommand(START_FG_SERVICE_COMMAND); in testForegroundServiceBadNotification()
117 try (InputStreamSource logSource = mDevice.getLogcat()) { in testForegroundServiceBadNotification()
133 final String lsOut = mDevice.executeShellCommand("ls -d " + procStr).trim(); in testForegroundServiceBadNotification()
/cts/hostsidetests/gwp_asan/src/android/cts/gwp_asan/
DRecoverableDefaultTest.java45 mDevice.setProperty(PROCESS_SAMPLING_SYSPROP + TEST_PKG, "1"); in setUp()
46 mDevice.setProperty(PROCESS_SAMPLING_SYSPROP + TEST_PKG + ":gwp_asan_enabled", "1"); in setUp()
47 mDevice.setProperty(PROCESS_SAMPLING_SYSPROP + TEST_PKG + ":gwp_asan_default", "1"); in setUp()
53 mDevice.setProperty(PROCESS_SAMPLING_SYSPROP + TEST_PKG, ""); in tearDown()
54 mDevice.setProperty(PROCESS_SAMPLING_SYSPROP + TEST_PKG + ":gwp_asan_enabled", ""); in tearDown()
55 mDevice.setProperty(PROCESS_SAMPLING_SYSPROP + TEST_PKG + ":gwp_asan_default", ""); in tearDown()
DNonRecoverableTest.java42 mDevice.setProperty(RECOVERABLE_SYSPROP + TEST_PKG, "false"); in setUp()
43 mDevice.setProperty(RECOVERABLE_SYSPROP + TEST_PKG + ":gwp_asan_enabled", "false"); in setUp()
44 mDevice.setProperty(RECOVERABLE_SYSPROP + TEST_PKG + ":gwp_asan_default", "false"); in setUp()
50 mDevice.setProperty(RECOVERABLE_SYSPROP + TEST_PKG, ""); in tearDown()
51 mDevice.setProperty(RECOVERABLE_SYSPROP + TEST_PKG + ":gwp_asan_enabled", ""); in tearDown()
52 mDevice.setProperty(RECOVERABLE_SYSPROP + TEST_PKG + ":gwp_asan_default", ""); in tearDown()
/cts/hostsidetests/security/src/android/security/cts/
DMetadataEncryptionTest.java38 private ITestDevice mDevice; field in MetadataEncryptionTest
42 mDevice = getDevice(); in setUp()
56 if (PropertyUtil.getFirstApiLevel(mDevice) <= 29) { in testMetadataEncryptionIsEnabled()
59 if (PropertyUtil.propertyEquals(mDevice, "ro.crypto.type", "managed")) { in testMetadataEncryptionIsEnabled()
67 mDevice.getBooleanProperty("ro.crypto.metadata.enabled", false)); in testMetadataEncryptionIsEnabled()
73 final int firstApiLevel = Math.min(PropertyUtil.getFirstApiLevel(mDevice), in assumeSecurityModelCompat()
74 PropertyUtil.getVendorApiLevel(mDevice)); in assumeSecurityModelCompat()
DPerfEventParanoidTest.java39 private ITestDevice mDevice; field in PerfEventParanoidTest
49 mDevice = getDevice(); in setUp()
58 long lsmHookPropValue = mDevice.getIntProperty(PERF_EVENT_LSM_SYSPROP, 0); in testPerfEventRestricted()
62 String paranoidOut = mDevice.executeShellCommand(paranoidCmd); in testPerfEventRestricted()
64 if (PropertyUtil.getFirstApiLevel(mDevice) >= ANDROID_R_API_LEVEL) { in testPerfEventRestricted()
92 final int firstApiLevel = Math.min(PropertyUtil.getFirstApiLevel(mDevice), in assumeSecurityModelCompat()
93 PropertyUtil.getVendorApiLevel(mDevice)); in assumeSecurityModelCompat()
DKernelConfigTest.java57 private ITestDevice mDevice; field in KernelConfigTest
62 mDevice = getDevice(); in setUp()
64 configSet = getDeviceConfig(mDevice, cachedConfigGzSet); in setUp()
147 if (PropertyUtil.getFirstApiLevel(mDevice) < 28) { in testConfigHardenedUsercopy()
163 if (PropertyUtil.getFirstApiLevel(mDevice) < 28) { in testConfigPAN()
167 if (CpuFeatures.isArm64(mDevice)) { in testConfigPAN()
172 } else if (CpuFeatures.isArm32(mDevice)) { in testConfigPAN()
184 mDevice.pullFileContents("/sys/devices/system/cpu/vulnerabilities/meltdown"); in getHardware()
186 mDevice.pullFileContents("/sys/devices/system/cpu/vulnerabilities/spectre_v2"); in getHardware()
195 if (!mDevice.doesFileExist(nodeInfo)) in getHardware()
[all …]
DSELinuxNeverallowRulesTest.java69 private ITestDevice mDevice; field in SELinuxNeverallowRulesTest
91 mDevice = getDevice(); in setUp()
94 assumeTrue("skipping not compatible rule", mRule.isCompatible(mDevice)); in setUp()
101 devicePolicyFile = SELinuxHostTest.getDevicePolicyFile(mDevice); in setUp()
103 if (SELinuxHostTest.isSepolicySplit(mDevice)) { in setUp()
105 SELinuxHostTest.getDeviceSystemPolicyFile(mDevice); in setUp()
110 SELinuxHostTest.getVendorSepolicyVersion(mBuild, mDevice); in setUp()
133 (SELinuxHostTest.isSepolicySplit(mDevice) in testNeverallowRules()
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/
DDocumentsClientTest.java134 return mDevice.findObject(selector); in findSearchViewTextField()
167 mDevice.waitForIdle(); in findDocument()
187 mDevice.swipe(/* startX= */ mDevice.getDisplayWidth() / 2, in findDocument()
188 /* startY= */ mDevice.getDisplayHeight() / 2, in findDocument()
189 /* endX= */ mDevice.getDisplayWidth() / 2, in findDocument()
260 mDevice.waitForIdle(); in testOpenSimple()
266 mDevice.waitForIdle(); in testOpenSimple()
271 mDevice.waitForIdle(); in testOpenSimple()
273 mDevice.waitForIdle(); in testOpenSimple()
276 mDevice.waitForIdle(); in testOpenSimple()
[all …]
/cts/tests/tests/settings/src/android/settings/cts/
DAutoPrivacySettingsTest.java84 private final UiDevice mDevice = UiDevice.getInstance(getInstrumentation()); field in AutoPrivacySettingsTest
126 mDevice.waitForIdle(); in testPrivacyMicrophoneSettings()
130 mDevice.waitForIdle(); in testPrivacyMicrophoneSettings()
134 mDevice.waitForIdle(); in testPrivacyMicrophoneSettings()
144 mDevice.waitForIdle(); in testPrivacyMicrophoneSettings()
179 mDevice.waitForIdle(); in testPrivacyCameraSettings()
183 mDevice.waitForIdle(); in testPrivacyCameraSettings()
187 mDevice.waitForIdle(); in testPrivacyCameraSettings()
197 mDevice.waitForIdle(); in testPrivacyCameraSettings()
211 UiObject2 obj = mDevice.findObject(By.text(text).displayId(mDisplayId)); in assertFind()
[all …]
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0685/src/android/security/cts/CVE_2021_0685/
DDeviceTest.java38 private UiDevice mDevice; field in DeviceTest
42 mDevice = UiDevice.getInstance(getInstrumentation()); in startMainActivityFromHomeScreen()
44 mDevice.wakeUp(); in startMainActivityFromHomeScreen()
45 mDevice.pressMenu(); in startMainActivityFromHomeScreen()
46 mDevice.pressHome(); in startMainActivityFromHomeScreen()
58 mDevice.wait(Until.hasObject(By.pkg(TEST_PKG).depth(0)), LAUNCH_TIMEOUT_MS); in startMainActivityFromHomeScreen()
67 assertNotNull(message, mDevice.findObject(selector)); in testPackageElementPresence()
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DKeySetHostTest.java207 mDevice.uninstallPackage(pkgName); in testPackageUpgrade()
209 installResult = mDevice.installPackage(getTestAppFile(firstApk), in testPackageUpgrade()
216 installResult = mDevice.installPackage(getTestAppFile(secondApk), in testPackageUpgrade()
219 mDevice.uninstallPackage(pkgName); in testPackageUpgrade()
226 private ITestDevice mDevice; field in KeySetHostTest
245 mDevice = getDevice(); in setUp()
374 mDevice.uninstallPackage(KEYSET_PKG); in testKeyRotationPerm()
375 mDevice.uninstallPackage(KEYSET_PERM_DEF_PKG); in testKeyRotationPerm()
376 mDevice.uninstallPackage(KEYSET_TEST_PKG); in testKeyRotationPerm()
379 String installResult = mDevice.installPackage( in testKeyRotationPerm()
[all …]
/cts/hostsidetests/appsecurity/test-apps/EncryptionApp/src/com/android/cts/encryptionapp/
DEncryptionAppTest.java81 private UiDevice mDevice; field in EncryptionAppTest
92 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp()
93 assertNotNull(mDevice); in setUp()
114 mDevice.waitForIdle(); in testSetUp()
117 mDevice.executeShellCommand("locksettings set-disabled false"); in testSetUp()
118 String output = mDevice.executeShellCommand("locksettings set-pin 1234"); in testSetUp()
122 String clearOutput = mDevice.executeShellCommand("cmd recovery clear-lskf android"); in testSetUp()
135 mDevice.waitForIdle(); in testTearDown()
138 mDevice.executeShellCommand("locksettings clear --old 1234"); in testTearDown()
139 mDevice.executeShellCommand("locksettings set-disabled true"); in testTearDown()
[all …]
/cts/hostsidetests/statsdatom/apps/statsdapp/src/com/android/server/cts/device/statsdatom/
DMediaProjectionTests.java50 private final UiDevice mDevice = field in MediaProjectionTests
94 mDevice.waitForIdle(); in testMediaProjectionPermissionDialogCancel()
97 mDevice.wait(Until.findObject(By.res(CANCEL_RESOURCE_ID)), 5000L); in testMediaProjectionPermissionDialogCancel()
106 mDevice.waitForIdle(); in testMediaProjectionShowAppSelector()
110 boolean hasModeSpinner = mDevice.hasObject(By.res(SPINNER_RESOURCE_ID)); in testMediaProjectionShowAppSelector()
117 mDevice.wait(Until.findObject(By.res(SPINNER_RESOURCE_ID)), 5000L); in testMediaProjectionShowAppSelector()
120 boolean hasSingleAppOption = mDevice.hasObject(By.text(sSingleAppString)); in testMediaProjectionShowAppSelector()
127 mDevice.wait(Until.findObject(By.text(sSingleAppString)), 5000L); in testMediaProjectionShowAppSelector()
132 mDevice.wait(Until.findObject(By.res(ACCEPT_RESOURCE_ID)), 5000L); in testMediaProjectionShowAppSelector()

12345678