Home
last modified time | relevance | path

Searched refs:userId (Results 1 – 6 of 6) sorted by relevance

/platform_testing/libraries/system-helpers/user-helper/src/android/system/helpers/
DUserHelper.java67 int userId = INVALID_USER_ID; in createSecondaryUser() local
69 userId = Integer.parseInt(matcher.group(1)); in createSecondaryUser()
70 Log.i(TAG, String.format("User Name:%s User ID:%d", userName, userId)); in createSecondaryUser()
72 return userId; in createSecondaryUser()
84 int userId = INVALID_USER_ID; in getSecondaryUserId() local
86 userId = Integer.parseInt(matcher.group(1)); // 1 = id 2 = flag in getSecondaryUserId()
87 Log.i(TAG, String.format("The userId is %d", userId)); in getSecondaryUserId()
89 return userId; in getSecondaryUserId()
92 public void removeSecondaryUser(int userId) { in removeSecondaryUser() argument
94 CommandsHelper.execute("pm remove-user " + userId); in removeSecondaryUser()
/platform_testing/libraries/compatibility-common-util/src/com/android/compatibility/common/util/
DBackupUtils.java86 public void backupNowAndAssertSuccessForUser(String packageName, int userId) in backupNowAndAssertSuccessForUser() argument
88 assertBackupIsSuccessful(packageName, backupNowForUser(packageName, userId)); in backupNowAndAssertSuccessForUser()
110 public void restoreAndAssertSuccessForUser(String token, String packageName, int userId) in restoreAndAssertSuccessForUser() argument
112 assertRestoreIsSuccessful(restoreForUser(token, packageName, userId)); in restoreAndAssertSuccessForUser()
132 public boolean isLocalTransportSelectedForUser(int userId) throws IOException { in isLocalTransportSelectedForUser() argument
133 return getShellCommandOutput(String.format("bmgr --user %d list transports", userId)) in isLocalTransportSelectedForUser()
145 public boolean isBackupEnabledForUser(int userId) throws IOException { in isBackupEnabledForUser() argument
146 return getShellCommandOutput(String.format("bmgr --user %d enabled", userId)) in isBackupEnabledForUser()
173 private InputStream backupNowForUser(String packageName, int userId) throws IOException { in backupNowForUser() argument
175 String.format("bmgr --user %d backupnow %s", userId, packageName)); in backupNowForUser()
[all …]
/platform_testing/libraries/health/rules/src/android/platform/test/rule/
DNotesRoleManagerSecondaryUserRule.kt56 private val originalUserId = context.userId
115 private fun switchToUser(userId: Int) { in switchToUser()
119 context.getSystemService<ActivityManager>()?.switchUser(UserHandle.of(userId)) in switchToUser()
123 "Failed to switch to user $userId" in switchToUser()
132 Log.i(TAG, "Resuming from sleep to verify user switch to userID $userId is completed.") in switchToUser()
135 assert(getCurrentUserId() == userId) { "Ensure user switch to user $userId is completed" } in switchToUser()
/platform_testing/libraries/car-helpers/multiuser-helper/src/android/platform/helpers/
DMultiUserHelper.java178 String userId = device.executeShellCommand("cmd car_service get-initial-user").trim(); in getInitialUser() local
179 return Integer.parseInt(userId); in getInitialUser()
199 private void switchUserUsingShell(int userId) throws Exception { in switchUserUsingShell() argument
200 String retStr = SystemUtil.runShellCommand(SWITCH_USER_COMMAND + userId); in switchUserUsingShell()
202 throw new Exception("failed to switch to user: " + userId); in switchUserUsingShell()
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/
DDumpsysUtils.java147 public static String getRoleHolder(ITestDevice device, String roleName, int userId) in getRoleHolder() argument
154 String.format("user_id=%d.+?roles=(?<roles>\\[.+?])", userId) /* pattern */, in getRoleHolder()
/platform_testing/libraries/compatibility-common-util/tests/src/com/android/compatibility/common/util/
DBackupUtilsTest.java588 private String getBmgrCommand(String command, int userId) {
589 return "bmgr --user " + userId + " " + command;