/cts/tests/tests/provider/src/android/provider/cts/ |
D | SettingsPanelTest.java | 65 private UiDevice mDevice; field in SettingsPanelTest 70 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 89 mDevice.pressHome(); in cleanUp() 90 mDevice.wait(Until.hasObject(By.pkg(mLauncherPackage).depth(0)), TIMEOUT); in cleanUp() 99 String currentPackage = mDevice.getCurrentPackageName(); in internetPanel_correctPackage() 108 String currentPackage = mDevice.getCurrentPackageName(); in volumePanel_correctPackage() 117 String currentPackage = mDevice.getCurrentPackageName(); in nfcPanel_correctPackage() 126 String currentPackage = mDevice.getCurrentPackageName(); in wifiPanel_correctPackage() 135 String currentPackage = mDevice.getCurrentPackageName(); in internetPanel_doneClosesPanel() 142 currentPackage = mDevice.getCurrentPackageName(); in internetPanel_doneClosesPanel() [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/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/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/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/tests/tests/systemui/src/android/systemui/cts/ |
D | WindowInsetsBehaviorTests.java | 102 private UiDevice mDevice; field in WindowInsetsBehaviorTests 188 mDevice.waitForIdle(); in mainThreadRun() 213 return mDevice.findObject(targetSelector); in findSystemNavigationObject() 231 mDevice.wait(Until.hasObject(By.pkg("com.android.settings").depth(0)), in launchToSettingsSystemGesture() 233 mDevice.wait(Until.hasObject(By.text(mGesturePreferenceTitle)), 5000); in launchToSettingsSystemGesture() 234 if (mDevice.findObject(By.text(mGesturePreferenceTitle)) == null) { in launchToSettingsSystemGesture() 237 mDevice.findObject(By.text(mGesturePreferenceTitle)).click(); in launchToSettingsSystemGesture() 238 mDevice.wait(Until.hasObject(By.text(mSystemNavigationTitle)), 5000); in launchToSettingsSystemGesture() 239 if (mDevice.findObject(By.text(mSystemNavigationTitle)) == null) { in launchToSettingsSystemGesture() 242 mDevice.findObject(By.text(mSystemNavigationTitle)).click(); in launchToSettingsSystemGesture() [all …]
|
/cts/hostsidetests/security/src/android/security/cts/ |
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() 186 if (!mDevice.doesFileExist(nodeInfo)) in getHardware() 189 String nodeContent = mDevice.pullFileContents(nodeInfo); in getHardware() 212 String lsGrep = mDevice.executeShellCommand(String.format("ls \"%s\"", filePath)); in doesFileExist() [all …]
|
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 …]
|
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() 123 if (CpuFeatures.isArm64(mDevice)) { in testConfigStoreHalHasSeccompFilter()
|
D | PerfEventParanoidTest.java | 30 private ITestDevice mDevice; field in PerfEventParanoidTest 40 mDevice = getDevice(); in setUp() 47 long lsmHookPropValue = mDevice.getIntProperty(PERF_EVENT_LSM_SYSPROP, 0); in testPerfEventRestricted() 51 String paranoidOut = mDevice.executeShellCommand(paranoidCmd); in testPerfEventRestricted() 53 if (PropertyUtil.getFirstApiLevel(mDevice) >= ANDROID_R_API_LEVEL) { in testPerfEventRestricted()
|
/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/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/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/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/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/jdwptunnel/src/android/jdwptunnel/cts/ |
D | JdwpTunnelTest.java | 73 private ITestDevice mDevice; field in JdwpTunnelTest 79 mDevice = getDevice(); in setUp() 84 mDevice.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in moveToHomeScreen() 85 mDevice.executeShellCommand("wm dismiss-keyguard"); in moveToHomeScreen() 86 mDevice.executeShellCommand("input keyevent KEYCODE_HOME"); in moveToHomeScreen() 107 String result = mDevice.executeAdbCommand("forward", "tcp:0", "jdwp:" + pid); in forwardJdwp() 115 result = mDevice.executeAdbCommand("forward", "tcp:" + port, "jdwp:" + pid); in forwardJdwp() 122 mDevice.executeShellCommand("cmd activity start-activity -D -W -n " + in startupTest() 127 while ((pid = mDevice.executeShellCommand( in startupTest() 231 String debuggableDevice = mDevice.getProperty("ro.debuggable"); in testAttachDebuggerToProfileableApp()
|
/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/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/theme/src/android/theme/cts/ |
D | ThemeHostTest.java | 81 private ITestDevice mDevice; field in ThemeHostTest 95 mDevice = getDevice(); in setUp() 96 mRestoreDensity = resetDensityIfNeeded(mDevice); in setUp() 97 final String density = getDensityBucketForDevice(mDevice); in setUp() 128 if (checkHardwareTypeSkipTest(mDevice.executeShellCommand(HARDWARE_TYPE_CMD).trim())) { in extractReferenceImages() 144 mDevice.executeShellCommand(CLEAR_GENERATED_CMD); in tearDown() 146 restoreDensityIfNeeded(mDevice, mRestoreDensity); in tearDown() 152 if (checkHardwareTypeSkipTest(mDevice.executeShellCommand(HARDWARE_TYPE_CMD).trim())) { in testThemes() 168 mDevice.pullFile(GENERATED_ASSETS_ZIP, localZip)); in testThemes() 227 mDevice.executeShellCommand(STOP_CMD); in generateDeviceImages() [all …]
|
/cts/hostsidetests/ui/src/android/ui/cts/ |
D | TaskSwitchingTest.java | 53 private ITestDevice mDevice; field in TaskSwitchingTest 81 mDevice = getDevice(); in setUp() 89 mDevice.uninstallPackage(PACKAGES[i]); in installPackages() 91 mDevice.installPackage(app, false, options); in installPackages() 99 mDevice.uninstallPackage(PACKAGES[i]); in tearDown() 118 mDevice.getIDevice()); in doTestTaskSwitching() 120 mDevice.runInstrumentationTests(testRunner, listener); in doTestTaskSwitching()
|