/cts/tests/tests/provider/src/android/provider/cts/ |
D | SettingsPanelTest.java | 59 private UiDevice mDevice; field in SettingsPanelTest 64 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 75 mDevice.pressHome(); in cleanUp() 76 mDevice.wait(Until.hasObject(By.pkg(mLauncherPackage).depth(0)), TIMEOUT); in cleanUp() 85 String currentPackage = mDevice.getCurrentPackageName(); in internetPanel_correctPackage() 94 String currentPackage = mDevice.getCurrentPackageName(); in volumePanel_correctPackage() 103 String currentPackage = mDevice.getCurrentPackageName(); in nfcPanel_correctPackage() 112 String currentPackage = mDevice.getCurrentPackageName(); in wifiPanel_correctPackage() 121 final UiObject2 titleView = mDevice.findObject(By.res(SETTINGS_PACKAGE, RESOURCE_TITLE)); in internetPanel_correctTitle() 130 final UiObject2 titleView = mDevice.findObject(By.res(SETTINGS_PACKAGE, RESOURCE_TITLE)); in volumePanel_correctTitle() [all …]
|
/cts/hostsidetests/backup/src/android/cts/backup/ |
D | BackupPreparer.java | 62 private ITestDevice mDevice; field in BackupPreparer 67 mDevice = device; in setUp() 69 mIsBackupSupported = mDevice.hasFeature("feature:" + FEATURE_BACKUP); in setUp() 82 CLog.i("Enabling backup on %s", mDevice.getSerialNumber()); in setUp() 86 CLog.i("Selecting local transport on %s", mDevice.getSerialNumber()); in setUp() 98 mDevice = device; in tearDown() 102 CLog.i("Returning backup to it's previous state on %s", mDevice.getSerialNumber()); in tearDown() 106 mDevice.getSerialNumber()); in tearDown() 115 String output = mDevice.executeShellCommand("bmgr list transports"); in hasBackupTransport() 127 String output = mDevice.executeShellCommand("bmgr enabled"); in enableBackup() [all …]
|
D | BaseMultiUserBackupHostSideTest.java | 61 protected ITestDevice mDevice; field in BaseMultiUserBackupHostSideTest 70 mDevice = getDevice(); in setUp() 75 assumeTrue("Multi-user feature not supported", mDevice.isMultiUserSupported()); in setUp() 78 int currentUserId = mDevice.getCurrentUser(); in setUp() 82 int primaryUserId = mDevice.getPrimaryUserId(); in setUp() 84 mDevice.switchUser(primaryUserId); in setUp() 92 mDevice.switchUser(mInitialUser.get()); in tearDown() 117 boolean startSuccessful = mDevice.startUser(userId, /* wait for RUNNING_UNLOCKED */ true); in startUser() 120 mDevice.setSetting(userId, "secure", USER_SETUP_COMPLETE_SETTING, "1"); in startUser() 161 mDevice.executeShellCommand( in clearBackupDataInTransportForUser() [all …]
|
/cts/hostsidetests/os/src/android/os/cts/ |
D | PowerManagerTests.java | 55 private ITestDevice mDevice; field in PowerManagerTests 59 mDevice = getDevice(); in setUp() 72 mDevice.executeShellCommand("input keyevent 26; input keyevent 82"); in testCachedProcessReleasesWakeLock() 76 String processes = mDevice.executeShellCommand(CHECK_CACHED_CMD); in testCachedProcessReleasesWakeLock() 79 String wakelocks = mDevice.executeShellCommand(GET_WAKE_LOCKS_CMD); in testCachedProcessReleasesWakeLock() 86 mDevice.executeShellCommand("am make-uid-idle " + PACKAGE_NAME); in testCachedProcessReleasesWakeLock() 88 wakelocks = mDevice.executeShellCommand(GET_WAKE_LOCKS_CMD); in testCachedProcessReleasesWakeLock() 98 mDevice.executeShellCommand(String.format(startAppTemplate, packageName)); in makeCachedProcess() 100 mDevice.executeShellCommand(String.format(viewUriTemplate, "mailto:")); in makeCachedProcess() 101 mDevice.executeShellCommand(String.format(viewUriTemplate, "tel:")); in makeCachedProcess()
|
D | OsHostTests.java | 60 private ITestDevice mDevice; field in OsHostTests 79 mDevice = getDevice(); in setUp() 90 boolean wasRoot = mDevice.isAdbRoot(); in testNonExportedActivities() 92 mDevice.disableAdbRoot(); in testNonExportedActivities() 95 mDevice.executeShellCommand(START_NON_EXPORTED_ACTIVITY_COMMAND, outputReceiver); in testNonExportedActivities() 102 mDevice.enableAdbRoot(); in testNonExportedActivities() 111 mDevice.uninstallPackage(HOST_VERIFICATION_PKG); in testIntentFilterHostValidation() 115 mDevice.clearLogcat(); in testIntentFilterHostValidation() 122 String logs = mDevice.executeAdbCommand("logcat", "-v", "brief", "-d"); in testIntentFilterHostValidation() 149 mDevice.uninstallPackage(HOST_VERIFICATION_PKG); in testIntentFilterHostValidation()
|
/cts/tests/tests/systemui/src/android/systemui/cts/ |
D | WindowInsetsBehaviorTests.java | 75 private UiDevice mDevice; field in WindowInsetsBehaviorTests 161 mDevice.waitForIdle(); in mainThreadRun() 186 return mDevice.findObject(targetSelector); in findSystemNavigationObject() 204 mDevice.wait(Until.hasObject(By.pkg("com.android.settings").depth(0)), in launchToSettingsSystemGesture() 206 mDevice.wait(Until.hasObject(By.text(mGesturePreferenceTitle)), 5000); in launchToSettingsSystemGesture() 207 if (mDevice.findObject(By.text(mGesturePreferenceTitle)) == null) { in launchToSettingsSystemGesture() 210 mDevice.findObject(By.text(mGesturePreferenceTitle)).click(); in launchToSettingsSystemGesture() 211 mDevice.wait(Until.hasObject(By.text(mSystemNavigationTitle)), 5000); in launchToSettingsSystemGesture() 212 if (mDevice.findObject(By.text(mSystemNavigationTitle)) == null) { in launchToSettingsSystemGesture() 215 mDevice.findObject(By.text(mSystemNavigationTitle)).click(); in launchToSettingsSystemGesture() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/EncryptionApp/src/com/android/cts/encryptionapp/ |
D | EncryptionAppTest.java | 70 private UiDevice mDevice; field in EncryptionAppTest 81 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 82 assertNotNull(mDevice); in setUp() 103 mDevice.waitForIdle(); in testSetUp() 106 mDevice.executeShellCommand("settings put global require_password_to_decrypt 0"); in testSetUp() 107 mDevice.executeShellCommand("locksettings set-disabled false"); in testSetUp() 108 mDevice.executeShellCommand("locksettings set-pin 12345"); in testSetUp() 117 mDevice.waitForIdle(); in testTearDown() 120 mDevice.executeShellCommand("locksettings clear --old 12345"); in testTearDown() 121 mDevice.executeShellCommand("locksettings set-disabled true"); in testTearDown() [all …]
|
/cts/hostsidetests/security/src/android/cts/security/ |
D | KernelConfigTest.java | 50 private ITestDevice mDevice; field in KernelConfigTest 67 mDevice = device; in setDevice() 73 configSet = getDeviceConfig(mDevice, cachedConfigGzSet); in setUp() 151 if (PropertyUtil.getFirstApiLevel(mDevice) < 28) { in testConfigHardenedUsercopy() 166 if (PropertyUtil.getFirstApiLevel(mDevice) < 28) { in testConfigPAN() 170 if (CpuFeatures.isArm64(mDevice)) { in testConfigPAN() 175 } else if (CpuFeatures.isArm32(mDevice)) { in testConfigPAN() 183 String cpuInfo = mDevice.pullFileContents("/proc/cpuinfo"); in getHardware() 198 String lsGrep = mDevice.executeShellCommand(String.format("ls \"%s\"", filePath)); in doesFileExist() 225 if (PropertyUtil.getFirstApiLevel(mDevice) < 28) { in testConfigHardwareMitigations() [all …]
|
D | ProcessMustUseSeccompTest.java | 29 private ITestDevice mDevice; field in ProcessMustUseSeccompTest 37 mDevice = getDevice(); in setUp() 42 mDevice = null; in tearDown() 47 return PropertyUtil.getFirstApiLevel(mDevice) > 25; in isFullTrebleDevice() 59 mDevice.executeShellCommand(Cmd, Out); in getPidFromCmd() 87 mDevice.executeShellCommand("toybox cat /proc/" + Pid + "/status", Out); in pidHasSeccompBpf() 113 if (CpuFeatures.isArm64(mDevice)) { in testConfigStoreHalHasSeccompFilter()
|
D | SELinuxHostTest.java | 101 private ITestDevice mDevice; field in SELinuxHostTest 117 mDevice = device; in setDevice() 155 devicePolicyFile = getDevicePolicyFile(mDevice); in setUp() 156 if (isSepolicySplit(mDevice)) { in setUp() 157 devicePlatFcFile = getDeviceFile(mDevice, cachedDevicePlatFcFiles, in setUp() 159 if (mDevice.doesFileExist("/vendor/etc/selinux/nonplat_file_contexts")){ in setUp() 161 deviceNonplatFcFile = getDeviceFile(mDevice, cachedDeviceNonplatFcFiles, in setUp() 164 deviceNonplatFcFile = getDeviceFile(mDevice, cachedDeviceNonplatFcFiles, in setUp() 168 android.security.cts.SELinuxHostTest.getDeviceSystemPolicyFile(mDevice); in setUp() 170 devicePlatFcFile = getDeviceFile(mDevice, cachedDevicePlatFcFiles, in setUp() [all …]
|
/cts/hostsidetests/usage/src/android/app/usage/cts/ |
D | AppIdleHostTest.java | 50 private ITestDevice mDevice; field in AppIdleHostTest 55 mDevice = getDevice(); in setUp() 65 … String result = mDevice.executeShellCommand(String.format("am get-inactive %s", appPackage)); in isAppIdle() 75 mDevice.executeShellCommand(String.format("settings put global %s \"%s\"", in setAppIdleSettings() 84 String result = mDevice.executeShellCommand(String.format("settings get global %s", in getAppIdleSettings() 95 mDevice.executeShellCommand( in startAndStopTestApp() 103 mDevice.executeShellCommand( in startAndStopTestApp() 124 mDevice.executeShellCommand( in setAppStandbyBucket() 129 final String result = mDevice.executeShellCommand( in isAppStandbyEnabled() 135 String bucketString = mDevice.executeShellCommand( in getAppStandbyBucket() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/ |
D | DocumentsClientTest.java | 78 return mDevice.findObject(selector); in findSearchViewTextField() 113 mDevice.waitForIdle(); in findDocument() 149 mDevice.waitForIdle(); in testOpenSimple() 155 mDevice.waitForIdle(); in testOpenSimple() 160 mDevice.waitForIdle(); in testOpenSimple() 162 mDevice.waitForIdle(); in testOpenSimple() 165 mDevice.waitForIdle(); in testOpenSimple() 189 mDevice.waitForIdle(); in testOpenVirtual() 192 mDevice.waitForIdle(); in testOpenVirtual() 230 mDevice.waitForIdle(); in testCreateNew() [all …]
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | KeySetHostTest.java | 205 mDevice.uninstallPackage(pkgName); in testPackageUpgrade() 207 installResult = mDevice.installPackage(getTestAppFile(firstApk), in testPackageUpgrade() 214 installResult = mDevice.installPackage(getTestAppFile(secondApk), in testPackageUpgrade() 217 mDevice.uninstallPackage(pkgName); in testPackageUpgrade() 224 private ITestDevice mDevice; field in KeySetHostTest 243 mDevice = getDevice(); in setUp() 372 mDevice.uninstallPackage(KEYSET_PKG); in testKeyRotationPerm() 373 mDevice.uninstallPackage(KEYSET_PERM_DEF_PKG); in testKeyRotationPerm() 374 mDevice.uninstallPackage(KEYSET_TEST_PKG); in testKeyRotationPerm() 377 String installResult = mDevice.installPackage( in testKeyRotationPerm() [all …]
|
/cts/hostsidetests/usb/src/com/android/cts/usb/ |
D | TestUsbTest.java | 53 private ITestDevice mDevice; field in TestUsbTest 70 mDevice = getDevice(); in setUp() 71 mDevice.uninstallPackage(PACKAGE_NAME); in setUp() 85 mDevice.installPackage(app, false, true, options); in installApp() 91 mDevice.uninstallPackage(PACKAGE_NAME); in tearDown() 97 mDevice.getIDevice()); in runTestOnDevice() 99 mDevice.runInstrumentationTests(testRunner, listener); in runTestOnDevice() 136 String adbSerial = mDevice.getSerialNumber().toLowerCase().trim(); in testUsbSerialReadOnDeviceMatches() 140 if (mDevice.isAdbTcp()) { // adb over WiFi, no point checking it in testUsbSerialReadOnDeviceMatches() 144 String roSerial = mDevice.executeShellCommand("getprop ro.serialno").toLowerCase(). in testUsbSerialReadOnDeviceMatches() [all …]
|
/cts/tests/tests/graphics/jni/ |
D | CameraTestHelpers.cpp | 62 &mDevice); in initCamera() 63 if (ret != AMEDIA_OK || mDevice == nullptr) { in initCamera() 64 ALOGE("Failed to open camera, ret=%d, mDevice=%p.", ret, mDevice); in initCamera() 98 ret = ACameraDevice_createCaptureSession(mDevice, mOutputs, &mSessionCb, in initCamera() 106 ret = ACameraDevice_createCaptureRequest(mDevice, TEMPLATE_RECORD, in initCamera() 164 if (mDevice) { in closeCamera() 165 ACameraDevice_close(mDevice); in closeCamera() 166 mDevice = nullptr; in closeCamera()
|
/cts/hostsidetests/monkey/src/com/android/cts/monkey/ |
D | AbstractMonkeyTest.java | 27 ITestDevice mDevice; field in AbstractMonkeyTest 42 mDevice = getDevice(); in setUp() 46 mDevice.uninstallPackage(PKGS[i]); in setUp() 48 mDevice.installPackage(app, false, options); in setUp() 57 mDevice.uninstallPackage(PKGS[i]); in tearDown() 62 mDevice.executeAdbCommand("logcat", "-c"); in clearLogCat()
|
/cts/hostsidetests/devicepolicy/app/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/ |
D | CrossProfileAppsStartActivityTest.java | 61 private UiDevice mDevice; field in CrossProfileAppsStartActivityTest 72 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in wakeupDeviceAndPressHome() 73 mDevice.wakeUp(); in wakeupDeviceAndPressHome() 74 mDevice.pressMenu(); in wakeupDeviceAndPressHome() 75 mDevice.pressHome(); in wakeupDeviceAndPressHome() 90 mDevice.pressHome(); in pressHome() 101 UiObject2 textView = mDevice.wait(Until.findObject(By.res(ID_USER_TEXTVIEW)), in testCanStartMainActivity() 119 UiObject2 textView = mDevice.wait(Until.findObject(By.res(ID_USER_TEXTVIEW2)), in testCanStartNonMainActivity()
|
D | CrossProfileAppsTargetUserTest.java | 59 private UiDevice mDevice; field in CrossProfileAppsTargetUserTest 70 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in wakeupDeviceAndPressHome() 71 mDevice.wakeUp(); in wakeupDeviceAndPressHome() 72 mDevice.pressMenu(); in wakeupDeviceAndPressHome() 73 mDevice.pressHome(); in wakeupDeviceAndPressHome() 88 mDevice.pressHome(); in pressHome() 106 UiObject2 textView = mDevice.wait( in testCanStartMainActivity()
|
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/metrics/ |
D | AtomMetricTester.java | 59 private final ITestDevice mDevice; field in AtomMetricTester 62 mDevice = device; in AtomMetricTester() 94 mDevice.pushFile(configFile, remotePath); in uploadConfig() 95 mDevice.executeShellCommand(String.format(UPDATE_CONFIG_CMD, remotePath, CONFIG_ID)); in uploadConfig() 96 mDevice.executeShellCommand("rm " + remotePath); in uploadConfig() 100 mDevice.executeShellCommand(String.format(REMOVE_CONFIG_CMD, configId)); in removeConfig() 208 strUid = mDevice.executeShellCommand("id -u"); in getHostUid() 213 if (mDevice.isAdbRoot()) { in getHostUid() 236 mDevice.executeShellCommand(command, receiver); in getDump() 242 if ("false".equals(mDevice.getProperty("ro.statsd.enable")) in isStatsdDisabled() [all …]
|
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ |
D | UserActivityEmulator.java | 28 private final ITestDevice mDevice; field in UserActivityEmulator 32 mDevice = device; in UserActivityEmulator() 33 String outputString = mDevice.executeShellCommand ("wm size"); in UserActivityEmulator() 48 mDevice.executeShellCommand(String.format("input tap %d %d", mWidth / 2, mHeight / 2)); in tapScreenCenter()
|
/cts/hostsidetests/jdwptunnel/src/android/jdwptunnel/cts/ |
D | JdwpTunnelTest.java | 67 private ITestDevice mDevice; field in JdwpTunnelTest 72 mDevice = getDevice(); in setUp() 77 mDevice.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in moveToHomeScreen() 78 mDevice.executeShellCommand("wm dismiss-keyguard"); in moveToHomeScreen() 79 mDevice.executeShellCommand("input keyevent KEYCODE_HOME"); in moveToHomeScreen() 100 String result = mDevice.executeAdbCommand("forward", "tcp:0", "jdwp:" + pid); in forwardJdwp() 108 result = mDevice.executeAdbCommand("forward", "tcp:" + port, "jdwp:" + pid); in forwardJdwp() 115 mDevice.executeShellCommand("cmd activity start-activity -D -W -n " + in startupTest() 120 while ((pid = mDevice.executeShellCommand( in startupTest()
|
/cts/hostsidetests/devicepolicy/app/PasswordComplexity/src/com.android.cts.passwordcomplexity/ |
D | GetPasswordComplexityTest.java | 28 private UiDevice mDevice; field in GetPasswordComplexityTest 33 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 34 if (!mDevice.executeShellCommand("cmd lock_settings verify") in setUp() 132 String out = mDevice.executeShellCommand("cmd lock_settings set-pattern " + pattern); in setPattern() 140 String out = mDevice.executeShellCommand("cmd lock_settings set-pin " + pin); in setPin() 149 mDevice.executeShellCommand("cmd lock_settings set-password " + password); in setPassword() 161 mDevice.executeShellCommand("cmd lock_settings clear --old " + mScreenLock); in clearScreenLock()
|
/cts/hostsidetests/net/src/com/android/cts/net/ |
D | ProcNetTest.java | 58 private ITestDevice mDevice; field in ProcNetTest 76 mDevice = device; in setDevice() 86 String interfaceDirs[] = mDevice.executeAdbCommand("shell", "ls", "-1", in getSysctlDirs() 104 String mode = mDevice.executeAdbCommand("shell", "stat", "-c", "%a", path).trim(); in readIntFromPath() 105 String user = mDevice.executeAdbCommand("shell", "stat", "-c", "%u", path).trim(); in readIntFromPath() 106 String group = mDevice.executeAdbCommand("shell", "stat", "-c", "%g", path).trim(); in readIntFromPath() 110 return Integer.parseInt(mDevice.executeAdbCommand("shell", "cat", path).trim()); in readIntFromPath()
|
/cts/tests/providerui/src/android/providerui/cts/ |
D | MediaStoreUiTest.java | 105 private UiDevice mDevice; field in MediaStoreUiTest 124 mDevice = UiDevice.getInstance(mInstrumentation); in setUp() 214 try { mDevice.findObject(sel).click(); } catch (Throwable ignored) { } in maybeClick() 218 try { mDevice.findObject(sel).click(); } catch (Throwable ignored) { } in maybeClick() 326 mDevice.waitForIdle(); in getImageCaptureIntentResult() 333 mDevice.pressKeyCode(KeyEvent.KEYCODE_CAMERA); in getImageCaptureIntentResult() 334 mDevice.waitForIdle(); in getImageCaptureIntentResult() 337 mDevice.pressKeyCode(KeyEvent.KEYCODE_DPAD_CENTER); in getImageCaptureIntentResult() 338 mDevice.waitForIdle(); in getImageCaptureIntentResult() 348 mDevice.waitForIdle(); in getImageCaptureIntentResult() [all …]
|
/cts/hostsidetests/harmfulappwarning/src/android/harmfulappwarning/cts/ |
D | HarmfulAppWarningTest.java | 77 private ITestDevice mDevice; field in HarmfulAppWarningTest 82 mDevice = getDevice(); in setUp() 83 mDevice.clearLogcat(); in setUp() 136 mDevice.executeShellCommand(SET_HARMFUL_APP_WARNING_COMMAND); in testLaunchAnyway() 148 mDevice.executeShellCommand(SET_HARMFUL_APP_WARNING_COMMAND); in testUninstall() 158 mDevice.executeShellCommand(SET_HARMFUL_APP_WARNING_COMMAND); in testDismissDialog()
|