Home
last modified time | relevance | path

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

12345678910

/cts/hostsidetests/backup/src/android/cts/backup/
DBaseMultiUserBackupHostSideTest.java106 String userId = output.substring(output.lastIndexOf(" ")).trim(); in createProfileUser() local
107 return Integer.parseInt(userId); in createProfileUser()
115 void startUser(int userId) throws DeviceNotAvailableException { in startUser() argument
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()
123 void startUserAndInitializeForBackup(int userId) in startUserAndInitializeForBackup() argument
126 mBackupUtils.activateBackupForUser(true, userId); in startUserAndInitializeForBackup()
128 startUser(userId); in startUserAndInitializeForBackup()
130 mBackupUtils.waitUntilBackupServiceIsRunning(userId); in startUserAndInitializeForBackup()
132 mBackupUtils.enableBackupForUser(true, userId); in startUserAndInitializeForBackup()
[all …]
/cts/hostsidetests/multiuser/src/android/host/multiuser/
DEphemeralTest.java116 final int userId = createUser(); in testRemoveUserWhenPossible_nonRunningUserRemoved() local
118 executeRemoveUserWhenPossible(userId, /* expectedResult= */ REMOVE_RESULT_REMOVED); in testRemoveUserWhenPossible_nonRunningUserRemoved()
120 assertUserNotPresent(userId); in testRemoveUserWhenPossible_nonRunningUserRemoved()
134 final int userId = createUser(); in testRemoveUserWhenPossible_currentUserSetEphemeral_removeAfterSwitch() local
136 assertSwitchToUser(userId); in testRemoveUserWhenPossible_currentUserSetEphemeral_removeAfterSwitch()
137 executeRemoveUserWhenPossible(userId, /* expectedResult= */ REMOVE_RESULT_DEFERRED); in testRemoveUserWhenPossible_currentUserSetEphemeral_removeAfterSwitch()
138 assertUserEphemeral(userId); in testRemoveUserWhenPossible_currentUserSetEphemeral_removeAfterSwitch()
141 waitForUserRemove(userId); in testRemoveUserWhenPossible_currentUserSetEphemeral_removeAfterSwitch()
142 assertUserNotPresent(userId); in testRemoveUserWhenPossible_currentUserSetEphemeral_removeAfterSwitch()
156 final int userId = createUser(); in testRemoveUserWhenPossible_currentUserSetEphemeral_removeAfterReboot() local
[all …]
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DBaseDevicePolicyTest.java266 protected void waitForUserUnlock(int userId) throws Exception { in waitForUserUnlock() argument
268 String.format("am get-started-user-state %d", userId), in waitForUserUnlock()
299 protected void installAppAsUser(String appFileName, int userId) throws FileNotFoundException, in installAppAsUser() argument
301 installAppAsUser(appFileName, true, userId); in installAppAsUser()
304 protected void installAppAsUser(String appFileName, boolean grantPermissions, int userId) in installAppAsUser() argument
306 installAppAsUser(appFileName, grantPermissions, /* dontKillApp */ false, userId); in installAppAsUser()
310 boolean dontKillApp, int userId) in installAppAsUser() argument
312 CLog.e("Installing app %s for user %d", appFileName, userId); in installAppAsUser()
323 buildHelper.getTestFile(appFileName), true, grantPermissions, userId, in installAppAsUser()
325 assertNull("Failed to install " + appFileName + " for user " + userId + ": " + result, in installAppAsUser()
[all …]
DDeviceAndProfileOwnerTest.java240 int userId = getUserIdForAlwaysOnVpnTests(); in testAlwaysOnVpn() local
241 installAppAsUser(VPN_APP_APK, userId); in testAlwaysOnVpn()
242 executeDeviceTestClassNoRestrictBackground(".AlwaysOnVpnTest", userId); in testAlwaysOnVpn()
253 int userId = getUserIdForAlwaysOnVpnTests(); in testAlwaysOnVpnLockDown() local
254 installAppAsUser(VPN_APP_APK, userId); in testAlwaysOnVpnLockDown()
256 executeDeviceTestMethod(".AlwaysOnVpnMultiStageTest", "testAlwaysOnSet", userId); in testAlwaysOnVpnLockDown()
257 forceStopPackageForUser(VPN_APP_PKG, userId); in testAlwaysOnVpnLockDown()
258 executeDeviceTestMethod(".AlwaysOnVpnMultiStageTest", "testNetworkBlocked", userId); in testAlwaysOnVpnLockDown()
260 executeDeviceTestMethod(".AlwaysOnVpnMultiStageTest", "testCleanup", userId); in testAlwaysOnVpnLockDown()
268 int userId = getUserIdForAlwaysOnVpnTests(); in testAlwaysOnVpnAcrossReboot() local
[all …]
DDeviceOwnerTest.java382 final int userId = createUser(); in testNetworkLoggingWithTwoUsers() local
389 removeUser(userId); in testNetworkLoggingWithTwoUsers()
672 final int userId = createAffiliatedSecondaryUser(); in testPackageInstallCache_multiUser() local
685 "testInstallExistingPackage", userId); in testPackageInstallCache_multiUser()
691 "testPackageUninstall", userId); in testPackageInstallCache_multiUser()
695 "testPackageInstall", userId); in testPackageInstallCache_multiUser()
709 "testPackageUninstall", userId); in testPackageInstallCache_multiUser()
713 "testInstallExistingPackage", userId); in testPackageInstallCache_multiUser()
848 final int userId = createUser(); in testSetUserControlDisabledPackages_multiUser_reboot_verifyPackageNotStopped() local
855 installAppAsUser(SIMPLE_APP_APK, userId); in testSetUserControlDisabledPackages_multiUser_reboot_verifyPackageNotStopped()
[all …]
/cts/tests/PhotoPicker/src/android/photopicker/cts/util/
DPhotoPickerFilesUtils.java48 public static List<Uri> createImagesAndGetUris(int count, int userId) in createImagesAndGetUris() argument
50 return createImagesAndGetUris(count, userId, /* isFavorite */ false); in createImagesAndGetUris()
53 public static List<Uri> createImagesAndGetUris(int count, int userId, boolean isFavorite) in createImagesAndGetUris() argument
55 List<Pair<Uri, String>> createdImagesData = createImagesAndGetUriAndPath(count, userId, in createImagesAndGetUris()
75 public static List<Pair<Uri, String>> createImagesAndGetUriAndPath(int count, int userId, in createImagesAndGetUriAndPath() argument
80 Pair<Uri, String> createdImageData = createImage(userId, isFavorite); in createImagesAndGetUriAndPath()
82 clearMediaOwner(createdImageData.first, userId); in createImagesAndGetUriAndPath()
90 private static Pair<Uri, String> createImage(int userId, boolean isFavorite) throws Exception { in createImage() argument
92 MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/jpeg", userId, isFavorite); in createImage()
95 public static List<Uri> createMj2VideosAndGetUris(int count, int userId) throws Exception { in createMj2VideosAndGetUris() argument
[all …]
/cts/hostsidetests/inputmethodservice/common/src/android/inputmethodservice/cts/common/test/
DShellCommandUtils.java39 public static String getCurrentIme(int userId) { in getCurrentIme() argument
40 return String.format("settings --user %d get %s", userId, SETTING_DEFAULT_IME); in getCurrentIme()
49 public static String setCurrentImeSync(String imeId, int userId) { in setCurrentImeSync() argument
50 return String.format("ime set --user %d %s", userId, imeId); in setCurrentImeSync()
57 public static String getEnabledImes(int userId) { in getEnabledImes() argument
58 return String.format("ime list -s --user %d", userId); in getEnabledImes()
65 public static String getAvailableImes(int userId) { in getAvailableImes() argument
66 return String.format("ime list -s -a --user %d", userId); in getAvailableImes()
79 public static String enableIme(String imeId, int userId) { in enableIme() argument
80 return String.format("ime enable --user %d %s", userId, imeId); in enableIme()
[all …]
/cts/tests/inputmethod/installtests/src/android/view/inputmethod/cts/installtests/common/
DShellCommandUtils.java30 public static String setCurrentImeSync(String imeId, int userId) { in setCurrentImeSync() argument
31 return String.format("ime set --user %d %s", userId, imeId); in setCurrentImeSync()
35 public static String enableIme(String imeId, int userId) { in enableIme() argument
36 return String.format("ime enable --user %d %s", userId, imeId); in enableIme()
51 public static String installExistingPackageAsUser(String packageName, int userId, in installExistingPackageAsUser() argument
53 return "pm install-existing --wait --user " + userId + (instant ? " --instant " in installExistingPackageAsUser()
78 public static String clearPackageData(String packageName, int userId) { in clearPackageData() argument
79 return String.format("pm clear --user %d %s", userId, packageName); in clearPackageData()
83 public static String installExisting(String packageName, int userId, boolean instant) { in installExisting() argument
85 sb.append(" --user ").append(userId); in installExisting()
/cts/tests/tests/companion/common/src/android/companion/cts/common/
DAppHelper.kt25 val userId: Int, constant in android.companion.cts.common.AppHelper
30 runShellCommand("cmd companiondevice associate $userId $packageName $macAddress $role") in associate()
33 runShellCommand("cmd companiondevice disassociate $userId $packageName $macAddress") in associate()
36 runShellCommand("cmd companiondevice disassociate-all $userId $packageName") in associate()
39 runShellCommand("pm list packages --user $userId $packageName").isNotBlank() in associate()
41 fun install() = apkPath?.let { runShellCommand("pm install --user $userId $apkPath") } in associate()
44 fun uninstall() = runShellCommand("pm uninstall --user $userId $packageName") in uninstall()
46 fun clearData() = runShellCommand("pm clear --user $userId $packageName") in uninstall()
49 runShellCommand("cmd role get-role-holders --user $userId $role").contains(packageName) in uninstall()
52 runShellCommand("cmd role add-role-holder --user $userId $role $packageName") in uninstall()
[all …]
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DPackageVisibilityTest.java88 int userId = mUsers[1]; in testUninstalledPackageVisibility() local
89 assertTrue(userId > 0); in testUninstalledPackageVisibility()
90 getDevice().startUser(userId); in testUninstalledPackageVisibility()
91 installTestAppForUser(TEST_APK, userId); in testUninstalledPackageVisibility()
107 assertFalse(isAppVisibleForUser(TINY_PKG, userId, MATCH_NORMAL)); in testUninstalledPackageVisibility()
108 assertFalse(isAppVisibleForUser(TINY_PKG, userId, MATCH_UNINSTALLED)); in testUninstalledPackageVisibility()
112 ".PackageAccessTest", "testPackageAccess_notInOtherUser", userId); in testUninstalledPackageVisibility() local
114 ".PackageAccessTest", "testPackageAccess_notInOtherUserUninstalled", userId); in testUninstalledPackageVisibility() local
117 ".PackageAccessTest", "testPackageAccess_getPackagesCantSeeTiny", userId); in testUninstalledPackageVisibility() local
122 installTestAppForUser(TINY_APK, userId); in testUninstalledPackageVisibility()
[all …]
/cts/tests/tests/companion/core/src/android/companion/cts/core/
DBackupAndRestoreTest.kt56 val payload = getBackupPayload(userId) in <lambda>()
69 val payload = getBackupPayload(userId) in <lambda>()
74 applyRestoredPayload(payload, userId) in <lambda>()
86 val payload = getBackupPayload(userId) in <lambda>()
91 applyRestoredPayload(payload, userId) in <lambda>()
103 val payload = getBackupPayload(userId) in <lambda>()
115 applyRestoredPayload(payload, userId) in <lambda>()
138 applyRestoredPayload(payload, userId) in <lambda>()
149 val payload = getBackupPayload(userId) in <lambda>()
156 applyRestoredPayload(payload, userId) in <lambda>()
[all …]
DDeviceEventDeviceLockedTest.kt73 userId, in test_ble_event_on_device_locked()
80 simulateDeviceEventDeviceUnlocked(userId) in test_ble_event_on_device_locked()
113 userId, in test_bt_event_on_device_locked()
120 simulateDeviceEventDeviceUnlocked(userId) in test_bt_event_on_device_locked()
153 userId, in test_bt_ble_event_on_device_locked()
159 userId, in test_bt_ble_event_on_device_locked()
167 simulateDeviceEventDeviceUnlocked(userId) in test_bt_ble_event_on_device_locked()
184 startObservingDevicePresenceByUuid(userId, targetPackageName, UUID_A.toString()) in test_uuid_event_on_device_locked()
188 userId, in test_uuid_event_on_device_locked()
195 simulateDeviceEventDeviceUnlocked(userId) in test_uuid_event_on_device_locked()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DUserHandleTest.java33 private static void assertSameUserHandle(int userId) { in assertSameUserHandle() argument
34 assertSame(UserHandle.of(userId), UserHandle.of(userId)); in assertSameUserHandle()
45 for (int userId = -1000; userId <= 1000; userId++) { in testOf()
46 assertEquals(userId, UserHandle.of(userId).getIdentifier()); in testOf()
49 assertSameUserHandle(userId); in testOf()
53 private static void assertParcel(int userId) { in assertParcel() argument
55 p.writeParcelable(UserHandle.of(userId), 0); in assertParcel()
60 assertEquals(userId, read.getIdentifier()); in assertParcel()
97 private void assertConsistent(int userId, int appId) { in assertConsistent() argument
98 final int uid = UserHandle.getUid(userId, appId); in assertConsistent()
[all …]
/cts/hostsidetests/media/src/android/media/cts/
DBaseMultiUserTest.java108 for (int userId : getDevice().listUsers()) { in tearDown()
109 if (!mExistingUsers.contains(userId)) { in tearDown()
111 removeUser(userId); in tearDown()
147 String appFileName, String packageName, int userId, boolean asInstantApp) in installAppAsUser() argument
152 CLog.d("Installing app " + appFileName + " for user " + userId); in installAppAsUser()
158 userId, in installAppAsUser()
161 assertNull("Failed to install " + appFileName + " for user " + userId + ": " + result, in installAppAsUser()
172 int userId = Integer.parseInt(tokens[tokens.length-1]); in createAndStartUser() local
175 getDevice().startUser(userId); in createAndStartUser()
176 return userId; in createAndStartUser()
[all …]
/cts/hostsidetests/packagemanager/multiuser/src/com/android/tests/packagemanager/multiuser/host/
DPackageManagerMultiUserTestBase.java62 for (int userId : mCreatedUsers) { in tearDown()
63 removeUser(userId); in tearDown()
69 @Nullable String testMethodName, int userId, in runDeviceTestAsUser() argument
81 userId, in runDeviceTestAsUser() local
90 protected void runDeviceTestAsUser(String testMethodName, int userId, in runDeviceTestAsUser() argument
93 runDeviceTestAsUser(TEST_PACKAGE, TEST_CLASS, testMethodName, userId, params); in runDeviceTestAsUser()
109 int userId = Integer.parseInt(tokens[tokens.length - 1]); in createUser() local
110 mCreatedUsers.add(userId); in createUser()
112 setupUser(userId); in createUser()
113 return userId; in createUser()
[all …]
/cts/hostsidetests/webkit/src/com/android/cts/webkit/
DWebViewHostSideMultipleProfileTest.java100 private void installTestApkForUser(int userId) throws DeviceNotAvailableException { in installTestApkForUser() argument
112 String output = mDevice.installPackageForUser(file, true, false, userId, "--dont-kill"); in installTestApkForUser()
114 stopAndRemoveUser(userId); in installTestApkForUser()
118 stopAndRemoveUser(userId); in installTestApkForUser()
142 private void startUser(int userId) throws DeviceNotAvailableException { in startUser() argument
143 if (!mDevice.startUser(userId)) { in startUser()
144 mDevice.removeUser(userId); in startUser()
145 Assert.fail("Failed to start user " + userId); in startUser()
149 private void switchUser(int userId) throws DeviceNotAvailableException { in switchUser() argument
150 if (!mDevice.switchUser(userId)) { in switchUser()
[all …]
/cts/hostsidetests/car/util/src/android/car/cts/
DCarHostJUnit4TestCase.java143 for (int userId : mUsersToBeRemoved) { in restoreUsersState()
144 removeUser(userId); in restoreUsersState()
283 public UserInfo getUserInfo(int userId) throws Exception { in getUserInfo() argument
285 .filter((u) -> u.id == userId)) in getUserInfo()
351 int userId = executeAndParseCommand(CREATE_USER_OUTPUT_PATTERN, in createUser() local
357 markUserForRemovalAfterTest(userId); in createUser()
358 return userId; in createUser()
364 protected void markUserForRemovalAfterTest(int userId) { in markUserForRemovalAfterTest() argument
365 mUsersToBeRemoved.add(userId); in markUserForRemovalAfterTest()
371 protected void waitForUserInitialized(int userId) throws Exception { in waitForUserInitialized() argument
[all …]
/cts/tests/appcloning/src/android/appcloning/cts/
DAppCloningDeviceTestBase.java47 String userId = output.substring(output.lastIndexOf(' ') + 1) in createAndStartUser() local
49 assumeTrue(userId != null && !userId.trim().isEmpty()); in createAndStartUser()
51 SystemUtil.runShellCommandOrThrow("am start-user -w " + userId); in createAndStartUser()
52 return Integer.parseInt(userId); in createAndStartUser()
59 protected void removeUser(int userId) { in removeUser() argument
60 assertThat(userId).isNotEqualTo(0); in removeUser()
61 SystemUtil.runShellCommandOrThrow("pm remove-user " + userId); in removeUser()
/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/users/
DUserStatsTests.java59 for (Integer userId : mUsersToRemove) { in tearDown()
60 getDevice().removeUser(userId); in tearDown()
75 int userId = getDevice().createUser(userName, isGuest, false /* ephemeral */); in userCreate() local
76 mUsersToRemove.add(userId); in userCreate()
78 return userId; in userCreate()
83 int userId = getDevice().createUser(userName, isGuest, false /* ephemeral */); in removeGuestUser() local
84 mUsersToRemove.add(userId); in removeGuestUser()
86 getDevice().removeUser(userId); in removeGuestUser()
89 return userId; in removeGuestUser()
93 int userId = getDevice().createUser(userName, isGuest, false /* ephemeral */); in switchUser() local
[all …]
/cts/hostsidetests/appbinding/hostside/src/com/android/cts/appbinding/
DAppBindingHostTest.java80 private void installAppAsUser(String appFileName, boolean grantPermissions, int userId) in installAppAsUser() argument
82 CLog.d("Installing app " + appFileName + " for user " + userId); in installAppAsUser()
85 buildHelper.getTestFile(appFileName), true, grantPermissions, userId, "-t"); in installAppAsUser()
86 assertNull("Failed to install " + appFileName + " for user " + userId + ": " + result, in installAppAsUser()
180 private void setSmsApp(String pkg, int userId) throws Throwable { in setSmsApp() argument
182 String output1 = runCommand("cmd role get-role-holders --user " + userId in setSmsApp()
187 String output2 = runCommand("cmd role add-role-holder --user " + userId in setSmsApp()
244 String serviceClass, int userId) throws Throwable { in installAndCheckBound() argument
246 installAppAsUser(apk, true, userId); in installAndCheckBound()
249 setSmsApp(packageName, userId); in installAndCheckBound()
[all …]
/cts/hostsidetests/car/src/android/car/cts/
DPreCreateUsersHostTest.java171 private void assertHasPreCreatedUser(int userId) throws Exception { in assertHasPreCreatedUser() argument
173 CLog.d("assertHasPreCreatedUser(%d): pool=%s", userId, existingIds); in assertHasPreCreatedUser()
174 assertWithMessage("pre-created user not found").that(existingIds).contains(userId); in assertHasPreCreatedUser()
186 int userId = INVALID_USER_ID; in preCreateUser()
189 userId = Integer.parseInt(output.substring(output.lastIndexOf(" ")).trim()); in preCreateUser()
190 CLog.i("Pre-created user with id %d; waiting until it's initialized", userId); in preCreateUser()
191 markUserForRemovalAfterTest(userId); in preCreateUser()
192 waitForUserInitialized(userId); in preCreateUser()
193 assertHasPreCreatedUser(userId); in preCreateUser()
194 waitUntilUserDataIsPersisted(userId); in preCreateUser()
[all …]
/cts/hostsidetests/packagemanager/domainverification/device/standalone/src/com/android/cts/packagemanager/verify/domain/device/standalone/
DDomainVerificationIntentStandaloneTests.kt60 setAppLinksUserSelection(DECLARING_PKG_NAME_1, userId, true, DOMAIN_1, DOMAIN_2) in launchSelected()
72 setAppLinksUserSelection(DECLARING_PKG_NAME_1, userId, false, DOMAIN_1, DOMAIN_2) in launchSelected()
80 setAppLinksUserSelection(DECLARING_PKG_NAME_1, userId, true, DOMAIN_1, DOMAIN_2) in launchSelectedPreservedOnUpdate()
111 setAppLinksUserSelection(DECLARING_PKG_NAME_1, userId, true, DOMAIN_1, DOMAIN_2) in verifiedOverSelected()
128 setAppLinksUserSelection(DECLARING_PKG_NAME_1, userId, true, DOMAIN_1, DOMAIN_2) in selectedOverSelected()
132 setAppLinksUserSelection(DECLARING_PKG_NAME_2, userId, true, DOMAIN_1, DOMAIN_2) in selectedOverSelected()
136 setAppLinksUserSelection(DECLARING_PKG_NAME_2, userId, false, DOMAIN_1, DOMAIN_2) in selectedOverSelected()
149 setAppLinksUserSelection(DECLARING_PKG_NAME_2, userId, true, DOMAIN_1, DOMAIN_2) in selectedOverVerifiedFails()
160 setAppLinksAllowed(DECLARING_PKG_NAME_1, userId, false) in disableHandlingWhenVerified()
171 setAppLinksAllowed(DECLARING_PKG_NAME_1, userId, false) in disableHandlingWhenVerifiedPreservedOnUpdate()
[all …]
/cts/tests/inputmethod/installtests/src/android/view/inputmethod/cts/installtests/
DForceStopTest.java135 final int userId = user.id(); in testImeRemainsEnabledAfterForceStopMain() local
137 assertImeExistsInApiResult(Ime1Constants.IME_ID, userId); in testImeRemainsEnabledAfterForceStopMain()
138 runShellCommandOrThrow(ShellCommandUtils.enableIme(Ime1Constants.IME_ID, userId)); in testImeRemainsEnabledAfterForceStopMain()
139 assertImeEnabledInApiResult(Ime1Constants.IME_ID, userId); in testImeRemainsEnabledAfterForceStopMain()
142 ShellCommandUtils.setCurrentImeSync(Ime1Constants.IME_ID, userId)); in testImeRemainsEnabledAfterForceStopMain()
143 assertImeInCurrentInputMethodInfo(Ime1Constants.IME_ID, userId); in testImeRemainsEnabledAfterForceStopMain()
146 forceStopPackage(Ime1Constants.PACKAGE, userId); in testImeRemainsEnabledAfterForceStopMain()
155 assertImeEnabledInApiResult(Ime1Constants.IME_ID, userId); in testImeRemainsEnabledAfterForceStopMain()
159 assertImeNotCurrentInputMethodInfo(Ime1Constants.IME_ID, userId); in testImeRemainsEnabledAfterForceStopMain()
163 private static void forceStopPackage(String packageName, int userId) { in forceStopPackage() argument
[all …]
/cts/tests/tests/car/src/android/car/app/cts/
DMultiUserMultiDisplayWindowSecurityTest.java160 private List<Integer> getUnassignedDisplaysForUser(int userId) { in getUnassignedDisplaysForUser() argument
166 if (userForOccupantZone == userId) { in getUnassignedDisplaysForUser()
182 int userId = mCarOccupantZoneManager.getUserForDisplayId(displayId); in ensureAllDisplaysAreAssignedToUser() local
183 if (userId != INVALID_USER_ID) { in ensureAllDisplaysAreAssignedToUser()
187 userId = createNewUser(displayId); in ensureAllDisplaysAreAssignedToUser()
188 mUsersToRemove.add(userId); in ensureAllDisplaysAreAssignedToUser()
190 setUserSetupComplete(userId); in ensureAllDisplaysAreAssignedToUser()
191 startUserOnDisplay(userId, displayId); in ensureAllDisplaysAreAssignedToUser()
220 private static void setUserSetupComplete(int userId) { in setUserSetupComplete() argument
221 ShellUtils.runShellCommand("settings put --user %d secure user_setup_complete 1", userId); in setUserSetupComplete()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DHeadlessSystemUserTest.java71 final int userId = user.id; in testProfileOwnerIsSetOnNewUser() local
76 Context newUserContext = mContext.createContextAsUser(UserHandle.of(userId), in testProfileOwnerIsSetOnNewUser()
80 assertProfileOwner(newUserDpm.getProfileOwner(), userId); in testProfileOwnerIsSetOnNewUser() local
85 final int userId = user.id; in testProfileOwnerIsSetOnNewUser() local
86 Log.d(TAG, "Removing user " + userId); in testProfileOwnerIsSetOnNewUser()
88 () -> mUserManager.removeUser(userId)); in testProfileOwnerIsSetOnNewUser()
89 assertWithMessage("user %s removed", userId).that(removed).isTrue(); in testProfileOwnerIsSetOnNewUser()
94 private void assertProfileOwner(ComponentName admin, @UserIdInt int userId) { in assertProfileOwner() argument
95 assertWithMessage("Component %s is profile owner for user %s", admin, userId) in assertProfileOwner()

12345678910