/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ |
D | BaseDevicePolicyTest.java | 125 protected void installAppAsUser(String appFileName, int userId) throws FileNotFoundException, in installAppAsUser() argument 127 installAppAsUser(appFileName, true, userId); in installAppAsUser() 130 protected void installAppAsUser(String appFileName, boolean grantPermissions, int userId) in installAppAsUser() argument 132 CLog.d("Installing app " + appFileName + " for user " + userId); in installAppAsUser() 135 userId, "-t"); in installAppAsUser() 136 assertNull("Failed to install " + appFileName + " for user " + userId + ": " + result, in installAppAsUser() 141 protected void startUser(int userId) throws Exception { in startUser() argument 142 getDevice().startUser(userId); in startUser() 145 protected void switchUser(int userId) throws Exception { in switchUser() argument 147 String command = "am switch-user " + userId; in switchUser() [all …]
|
D | EphemeralUserTest.java | 41 int userId = createUser(FLAG_EPHEMERAL); in testCreateEphemeralUser() local 42 int flags = getUserFlags(userId); in testCreateEphemeralUser() 51 int userId = createUser(); in testCreateLongLivedUser() local 52 int flags = getUserFlags(userId); in testCreateLongLivedUser() 65 int userId = createUser(FLAG_EPHEMERAL); in testProfileInheritsEphemeral() local 66 int profileId = createManagedProfile(userId); in testProfileInheritsEphemeral() 78 int userId = createUser(FLAG_EPHEMERAL); in testRemoveEphemeralOnStop() local 79 startUser(userId); in testRemoveEphemeralOnStop() 80 assertTrue("ephemeral user must exists after start", listUsers().contains(userId)); in testRemoveEphemeralOnStop() 81 stopUser(userId); in testRemoveEphemeralOnStop() [all …]
|
D | DeviceOwnerTest.java | 114 int userId = -1; in testRemoteBugreportWithTwoUsers() local 116 userId = createUser(); in testRemoteBugreportWithTwoUsers() 120 removeUser(userId); in testRemoteBugreportWithTwoUsers() 154 int userId = createUser(); in testRemoveUsersOnSetForceEphemeralUsers() local 155 assertTrue("User must have been created", listUsers().contains(userId)); in testRemoveUsersOnSetForceEphemeralUsers() 161 assertFalse("User must have been removed", listUsers().contains(userId)); in testRemoveUsersOnSetForceEphemeralUsers() 177 int userId = createUser(); in testRemoveUsersOnSetForceEphemeralUsersWithUserSwitch() local 178 assertTrue("User must have been created", listUsers().contains(userId)); in testRemoveUsersOnSetForceEphemeralUsersWithUserSwitch() 181 switchUser(userId); in testRemoveUsersOnSetForceEphemeralUsersWithUserSwitch() 195 if (!listUsers().contains(userId)) { in testRemoveUsersOnSetForceEphemeralUsersWithUserSwitch() [all …]
|
D | UserRestrictionsTest.java | 59 @Nullable String method, int userId) throws DeviceNotAvailableException { in runTests() argument 60 return runDeviceTestsAsUser(DEVICE_ADMIN_PKG, "." + className, method, userId); in runTests() 63 private boolean runTests(@Nonnull String className, int userId) in runTests() argument 65 return runTests(className, null, userId); in runTests()
|
D | ManagedProfileTest.java | 291 private void testCrossProfileCopyPasteInternal(int userId, boolean shouldSucceed) in testCrossProfileCopyPasteInternal() argument 293 final String direction = (userId == mParentUserId) in testCrossProfileCopyPasteInternal() 302 "testCanReadAcrossProfiles", userId)); in testCrossProfileCopyPasteInternal() 304 "testIsNotified", userId)); in testCrossProfileCopyPasteInternal() 307 "testCannotReadAcrossProfiles", userId)); in testCrossProfileCopyPasteInternal() 612 private void setDirectoryPrefix(String directoryName, int userId) in setDirectoryPrefix() argument 615 + " --user " + userId in setDirectoryPrefix() 723 private void disableActivityForUser(String activityName, int userId) in disableActivityForUser() argument 725 String command = "am start -W --user " + userId in disableActivityForUser() 733 private String changeUserRestrictionForUser(String key, String command, int userId) in changeUserRestrictionForUser() argument [all …]
|
D | CustomManagedProfileTest.java | 51 private void assertIsProvisioningAllowed(boolean expected, int userId) in assertIsProvisioningAllowed() argument 56 userId)); in assertIsProvisioningAllowed()
|
D | CustomDeviceOwnerTest.java | 102 int userId = -1; in testCannotSetDeviceOwnerWhenSecondaryUserPresent() local 105 userId = createUser(); in testCannotSetDeviceOwnerWhenSecondaryUserPresent() 109 removeUser(userId); in testCannotSetDeviceOwnerWhenSecondaryUserPresent()
|
D | DeviceAndProfileOwnerTest.java | 557 private void changeUserRestrictionForUser(String key, String command, int userId) in changeUserRestrictionForUser() argument 559 changePolicy(command, "--es extra-restriction-key " + key, userId); in changeUserRestrictionForUser() 562 private void changeAccountManagement(String command, String accountType, int userId) in changeAccountManagement() argument 564 changePolicy(command, "--es extra-account-type " + accountType, userId); in changeAccountManagement() 574 private void changePolicy(String command, String extras, int userId) in changePolicy() argument 576 String adbCommand = "am start -W --user " + userId in changePolicy()
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | Utils.java | 41 public static void runDeviceTests(ITestDevice device, String packageName, int userId) in runDeviceTests() argument 43 runDeviceTests(device, packageName, null, null, userId); in runDeviceTests() 52 int userId) throws DeviceNotAvailableException { in runDeviceTests() argument 53 runDeviceTests(device, packageName, testClassName, null, userId); in runDeviceTests() 62 String testMethodName, int userId) throws DeviceNotAvailableException { in runDeviceTests() argument 75 if (userId != USER_OWNER) { in runDeviceTests() 77 testRunner.addInstrumentationArg("hack_key", "hack_value --user " + userId); in runDeviceTests() 146 final int userId = Integer.parseInt( in createUserOnDevice() local 148 device.executeShellCommand("am start-user " + userId); in createUserOnDevice() 149 return userId; in createUserOnDevice() [all …]
|
D | ExternalStorageHostTest.java | 247 private void runDeviceTests(String packageName, String testClassName, int userId) in runDeviceTests() argument 249 Utils.runDeviceTests(getDevice(), packageName, testClassName, userId); in runDeviceTests() local 253 int userId) throws DeviceNotAvailableException { in runDeviceTests() argument 254 Utils.runDeviceTests(getDevice(), packageName, testClassName, testMethodName, userId); in runDeviceTests() local
|
/cts/hostsidetests/numberblocking/src/com/android/cts/numberblocking/hostside/ |
D | NumberBlockingTest.java | 150 private void installTestAppForUser(int userId) throws Exception { in installTestAppForUser() argument 151 LogUtil.CLog.logAndDisplay(Log.LogLevel.INFO, "Installing test app for user: " + userId); in installTestAppForUser() 154 testAppFile, true /*reinstall*/, userId); in installTestAppForUser() 168 private void runTestAsUser(String className, String methodName, int userId) throws Exception { in runTestAsUser() argument 170 className, methodName, userId); in runTestAsUser() 179 getDevice().runInstrumentationTestsAsUser(testRunner, userId, listener); in runTestAsUser() 198 private void setTestAppAsDefaultSmsAppForUser(boolean setToSmsApp, int userId) in setTestAppAsDefaultSmsAppForUser() argument 200 String command = String.format("appops set --user %d %s WRITE_SMS %s", userId, in setTestAppAsDefaultSmsAppForUser() 207 private int getUserSerialNumber(int userId) throws DeviceNotAvailableException { in getUserSerialNumber() argument 213 if (token.contains("UserInfo{" + userId + ":")) { in getUserSerialNumber() [all …]
|
/cts/hostsidetests/multiuser/src/android/host/multiuser/ |
D | BaseMultiUserTest.java | 69 protected int createRestrictedProfile(int userId) in createRestrictedProfile() argument 71 final String command = "pm create-user --profileOf " + userId + " --restricted " in createRestrictedProfile() 90 for (int userId : getDevice().listUsers()) { in removeTestUsers() 91 if (!mFixedUsers.contains(userId)) { in removeTestUsers() 92 getDevice().removeUser(userId); in removeTestUsers()
|
/cts/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ |
D | ReadExternalStorageTest.java | 80 final String userId = Integer.toString(android.os.Process.myUid() / 100000); in testMountPointsNotWritable() local 87 final File userPath = new File(path, userId); in testMountPointsNotWritable()
|
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/ |
D | ExternalStorageTest.java | 86 final String userId = Integer.toString(android.os.Process.myUid() / 100000); in testMountPointsNotReadable() local 93 final File userPath = new File(path, userId); in testMountPointsNotReadable()
|
/cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/ |
D | WriteExternalStorageTest.java | 290 final String userId = Integer.toString(android.os.Process.myUid() / 100000); in testSecondaryMountPointsNotWritable() local 295 final File userPath = new File(path, userId); in testSecondaryMountPointsNotWritable()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | JetPlayerTest.java | 214 public void onJetUserIdUpdate(JetPlayer player, int userId, int repeatCount) { in onJetUserIdUpdate() argument
|