Home
last modified time | relevance | path

Searched refs:FLAG_ADMIN (Results 1 – 25 of 40) sorted by relevance

12

/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DProfileDetailsHeaderPreferenceControllerTest.java19 import static android.content.pm.UserInfo.FLAG_ADMIN;
107 FLAG_INITIALIZED | FLAG_ADMIN); in onCreate_isAdmin_notCurrentProfile()
119 FLAG_INITIALIZED | FLAG_ADMIN); in onCreate_isAdmin_currentProfile()
DProfileDetailsActionButtonsPreferenceControllerTest.java19 import static android.content.pm.UserInfo.FLAG_ADMIN;
146 FLAG_INITIALIZED | FLAG_ADMIN); in onStart_isAdminViewingAdmin_makeAdminButtonHidden()
160 FLAG_INITIALIZED | FLAG_ADMIN); in onStart_isAdminViewingSelf_manageOtherProfilesButtonShown()
180 FLAG_INITIALIZED | FLAG_ADMIN); in onStart_isAdminViewingOther_manageOtherProfilesButtonHidden()
197 FLAG_INITIALIZED | FLAG_ADMIN); in onStart_isNonAdmin_addAProfileButtonShown()
216 FLAG_INITIALIZED | FLAG_ADMIN); in onStart_isAdmin_isOnlyProfile_makeAddAProfileButtonShown()
DProfilesBasePreferenceControllerTest.java19 import static android.content.pm.UserInfo.FLAG_ADMIN;
172 UserInfo adminOtherUser = new UserInfo(/* id= */ 11, "TEST_OTHER_NAME", FLAG_ADMIN); in refreshUi_userChange_updatesGroup()
221 UserInfo adminOtherUser = new UserInfo(/* id= */ 11, "TEST_OTHER_NAME", FLAG_ADMIN); in onUsersUpdated_updatesGroup()
DProfilesListPreferenceControllerTest.java19 import static android.content.pm.UserInfo.FLAG_ADMIN;
58 "TEST_USER_NAME", FLAG_ADMIN);
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/
DProfileHelperTest.java282 /* flags= */ UserInfo.FLAG_ADMIN | UserInfo.FLAG_SYSTEM, in testRemoveUser_isAdminUser_cannotRemoveSystemUser()
339 mockCreateUser(DEFAULT_ADMIN_NAME, UserInfo.FLAG_ADMIN, in testRemoveUser_removesLastAdminUser_createsAndSwitchesToNewAdminUser()
346 verify(mMockCarUserManager).createUser(DEFAULT_ADMIN_NAME, UserInfo.FLAG_ADMIN); in testRemoveUser_removesLastAdminUser_createsAndSwitchesToNewAdminUser()
363 mockCreateUser(DEFAULT_ADMIN_NAME, UserInfo.FLAG_ADMIN, in testRemoveUser_removesLastAdminUserFailsCreateNewUser_doesNotRemoveOrSwitchUser()
368 verify(mMockCarUserManager).createUser(DEFAULT_ADMIN_NAME, UserInfo.FLAG_ADMIN); in testRemoveUser_removesLastAdminUserFailsCreateNewUser_doesNotRemoveOrSwitchUser()
486 return new UserInfo(id, null, UserInfo.FLAG_ADMIN); in createAdminUser()
/packages/apps/Settings/tests/robotests/testutils/com/android/settings/testutils/shadow/
DShadowUserManager.java309 UserInfo.FLAG_INITIALIZED | UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY); in getPrimaryUser()
348 mUserProfileInfos.get(i).flags |= UserInfo.FLAG_ADMIN; in setUserAdmin()
359 userInfo.flags |= UserInfo.FLAG_ADMIN; in setIsAdminUser()
361 userInfo.flags &= ~UserInfo.FLAG_ADMIN; in setIsAdminUser()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DInitialUserSetterTest.java418 expectCreateFullUser("TheDude", UserManagerHelper.FLAG_ADMIN, newUser); in testCreateUser_ok_admin()
436 expectCreateFullUser("TheDude", UserManagerHelper.FLAG_ADMIN, newUser); in testCreateUser_ok_admin_setLocale()
600 expectCreateFullUser(OWNER_NAME, UserManagerHelper.FLAG_ADMIN, newUser); in testDefaultBehavior_firstBoot_ok()
615 expectCreateFullUser(OWNER_NAME, UserManagerHelper.FLAG_ADMIN, newUser); in testDefaultBehavior_firstBoot_ok_setLocale()
633 expectCreateFullUser(OWNER_NAME, UserManagerHelper.FLAG_ADMIN, newUser); in testDefaultBehavior_firstBoot_ok_setEmptyLocale()
651 expectCreateFullUser(OWNER_NAME, UserManagerHelper.FLAG_ADMIN, newUser); in testDefaultBehavior_firstBoot_ok_setBlankLocale()
681 expectCreateFullUser(OWNER_NAME, UserManagerHelper.FLAG_ADMIN, user); in testDefaultBehavior_firstBoot_fail_switchFailed()
695 expectCreateFullUser(OWNER_NAME, UserManagerHelper.FLAG_ADMIN, user); in testDefaultBehavior_firstBoot_fail_switchFailed_setLocale()
742 expectCreateFullUser(OWNER_NAME, UserManagerHelper.FLAG_ADMIN, newUser); in testDefaultBehavior_nonFirstBoot_ok_targetIsCurrentUserWhichIsEphemeral()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DDisallowAddUserTaskTest.java55 UserInfo.FLAG_PRIMARY | UserInfo.FLAG_ADMIN);
58 private final UserInfo mFullUser = new UserInfo(10, "FullUser", UserInfo.FLAG_ADMIN);
/packages/services/Car/car-builtin-lib/src/android/car/builtin/os/
DUserManagerHelper.java53 public static final int FLAG_ADMIN = UserInfo.FLAG_ADMIN; field in UserManagerHelper
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DInstalledAppCounterTest.java142 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN), in testCountInstalledAppsAcrossAllUsers()
214 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN))); in testCountInstalledApps_archivingDisabled()
236 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN))); in testCountInstalledApps_archivingEnabled()
DApplicationFeatureProviderImplTest.java255 final UserInfo mainUser = new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN); in testFindPersistentPreferredActivities()
429 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN), in setUpUsersAndInstalledApps()
DInstalledAppListerTest.java101 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN), in testCountInstalledAppsAcrossAllUsers()
DAppWithAdminGrantedPermissionsListerTest.java105 new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN), in verifyListInstalledApps()
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/
DMultiUserSwitchBarControllerTest.java88 mUserManager.addUser(10, "Test", UserInfo.FLAG_ADMIN); in onStart_userIsNotMain_shouldNotBeEnabled()
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/
DApplicationListFragmentTest.java120 final UserInfo user = new UserInfo(USER_ID, "main", UserInfo.FLAG_ADMIN); in buildApplicationList()
DApplicationListPreferenceControllerTest.java130 final UserInfo user = new UserInfo(MAIN_USER_ID, "main", UserInfo.FLAG_ADMIN); in buildApplicationList()
DEnterpriseSetDefaultAppsPreferenceControllerTest.java82 apps.add(new UserAppInfo(new UserInfo(i, "user." + i, UserInfo.FLAG_ADMIN), appInfo)); in setEnterpriseSetDefaultApps()
DEnterpriseSetDefaultAppsListPreferenceControllerTest.java116 final UserInfo user = new UserInfo(USER_ID, "main", UserInfo.FLAG_ADMIN); in testMultipleAppsForOneTypeOfDefault()
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/userpicker/
DUserPickerTestCase.java80 UserInfo.FLAG_ADMIN | UserInfo.FLAG_FULL);
/packages/services/Car/tests/carservice_unit_test/src/android/car/test/mocks/
DAndroidMockitoHelperTest.java96 UserInfo.FLAG_ADMIN, UserManager.USER_TYPE_FULL_SYSTEM);
301 UserManager.USER_TYPE_FULL_SECONDARY, UserInfo.FLAG_ADMIN); in testMockUmGetAliveUsers()
/packages/services/Car/libs/car-test-lib/src/android/car/test/mocks/
DAndroidMockitoHelper.java623 && ((mFlags & UserManagerHelper.FLAG_ADMIN) != UserManagerHelper.FLAG_ADMIN)) { in matches()
/packages/services/Car/libs/car-test-lib/src/android/car/test/util/
DUserTestingHelper.java307 flags |= UserInfo.FLAG_ADMIN; in build()
/packages/services/Car/service/src/com/android/car/user/
DCarUserService.java1295 flags |= userCreationRequest.isAdmin() ? UserManagerHelper.FLAG_ADMIN : 0; in createUser()
1391 || (flags & UserManagerHelper.FLAG_ADMIN) == UserManagerHelper.FLAG_ADMIN; in handleCreateUser()
1410 && (flags & UserManagerHelper.FLAG_ADMIN) == UserManagerHelper.FLAG_ADMIN) { in handleCreateUser()
1535 if ((flags & UserManagerHelper.FLAG_ADMIN) == UserManagerHelper.FLAG_ADMIN) { in getCreateUserRequest()
/packages/services/Car/car-lib/src/android/car/user/
DCarUserManager.java669 if ((flags & UserManagerHelper.FLAG_ADMIN) == UserManagerHelper.FLAG_ADMIN) { in createUser()
719 flags |= userCreationRequest.isAdmin() ? UserManagerHelper.FLAG_ADMIN : 0; in createUser()
/packages/services/Car/service/src/com/android/car/admin/
DCarDevicePolicyService.java163 userInfoFlags = UserManagerHelper.FLAG_ADMIN; in createUser()

12