/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/ |
D | UserHandleHelperUnitTest.java | 31 import android.os.UserHandle; 51 private final UserHandle mContextUser = UserHandle.of(111); 68 List<UserHandle> users = Arrays.asList(UserHandle.of(100), UserHandle.of(101), in testGetExistingUserHandle() 69 UserHandle.of(102)); in testGetExistingUserHandle() 71 UserHandle user100 = UserHandle.of(100); in testGetExistingUserHandle() 72 UserHandle user101 = UserHandle.of(101); in testGetExistingUserHandle() 73 UserHandle user102 = UserHandle.of(102); in testGetExistingUserHandle() 83 List<UserHandle> users = Arrays.asList(UserHandle.of(100), UserHandle.of(101), in testGetEnabledProfiles() 84 UserHandle.of(102)); in testGetEnabledProfiles() 107 UserHandle user = UserHandle.of(100); in testIsEphemeralUser() [all …]
|
D | InitialUserSetterTest.java | 20 import static android.os.UserHandle.USER_SYSTEM; 58 import android.os.UserHandle; 167 UserHandle user = expectRegularUserExists(mMockedUserHandleHelper, USER_ID); in testSwitchUser_ok_nonGuest() 182 UserHandle user = expectSystemUserExists(mMockedUserHandleHelper, UserHandle.USER_SYSTEM); in testSwitchUser_ok_systemUser() 183 expectSwitchUser(UserHandle.USER_SYSTEM); in testSwitchUser_ok_systemUser() 186 .setSwitchUserId(UserHandle.USER_SYSTEM) in testSwitchUser_ok_systemUser() 189 verifyUserSwitched(UserHandle.USER_SYSTEM); in testSwitchUser_ok_systemUser() 200 UserHandle newGuest = expectGuestUserExists(mMockedUserHandleHelper, NEW_USER_ID, in testSwitchUser_ok_guestReplaced() 221 UserHandle existingGuest = expectGuestUserExists(mMockedUserHandleHelper, USER_ID, in testSwitchUser_ok_guestDoesNotNeedToBeReplaced() 297 UserHandle currentUser = expectRegularUserExists(mMockedUserHandleHelper, CURRENT_USER_ID); in testSwitchUser_ok_targetIsCurrentUser() [all …]
|
D | MockedUserHandleBuilder.java | 22 import android.os.UserHandle; 25 private final UserHandle mUser; 31 mUser = UserHandle.of(userId); in MockedUserHandleBuilder() 71 private UserHandle build() { in build() 75 public static UserHandle expectRegularUserExists(@NonNull UserHandleHelper userHandleHelper, in expectRegularUserExists() 80 public static UserHandle expectUserExistsButGettersFail( in expectUserExistsButGettersFail() 85 public static UserHandle expectSystemUserExists(@NonNull UserHandleHelper userHandleHelper, in expectSystemUserExists() 90 public static UserHandle expectManagedProfileExists(@NonNull UserHandleHelper userHandleHelper, in expectManagedProfileExists() 96 public static UserHandle expectAdminUserExists(@NonNull UserHandleHelper userHandleHelper, in expectAdminUserExists() 101 public static UserHandle expectEphemeralUserExists(@NonNull UserHandleHelper userHandleHelper, in expectEphemeralUserExists() [all …]
|
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/ |
D | PackageUserKeyTest.java | 22 import android.os.UserHandle; 47 new PackageItemInfo(TEST_PACKAGE, UserHandle.CURRENT)); in fromPackageItemInfo_shouldCreateExpectedObject() 51 assertThat(packageUserKey.mUser).isEqualTo(UserHandle.CURRENT); in fromPackageItemInfo_shouldCreateExpectedObject() 56 PackageUserKey packageUserKey = new PackageUserKey(TEST_PACKAGE, UserHandle.CURRENT); in constructor_packageNameAndUserHandle_shouldCreateExpectedObject() 60 assertThat(packageUserKey.mUser).isEqualTo(UserHandle.CURRENT); in constructor_packageNameAndUserHandle_shouldCreateExpectedObject() 65 PackageUserKey packageUserKey = new PackageUserKey(CONVERSATIONS, UserHandle.CURRENT); in constructor_widgetCategoryAndUserHandle_shouldCreateExpectedObject() 69 assertThat(packageUserKey.mUser).isEqualTo(UserHandle.CURRENT); in constructor_widgetCategoryAndUserHandle_shouldCreateExpectedObject() 74 PackageUserKey packageUserKey = new PackageUserKey(TEST_PACKAGE, UserHandle.CURRENT); in equals_sameObject_shouldReturnTrue() 82 PackageUserKey packageUserKey = new PackageUserKey(TEST_PACKAGE, UserHandle.CURRENT); in equals_differentObjectSameContent_shouldReturnTrue() 83 PackageUserKey otherPackageUserKey = new PackageUserKey(TEST_PACKAGE, UserHandle.CURRENT); in equals_differentObjectSameContent_shouldReturnTrue() [all …]
|
/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/ |
D | CarNotificationListenerTest.java | 36 import android.os.UserHandle; 102 when(mStatusBarNotification.getUser()).thenReturn(new UserHandle(CURRENT_USER_ID)); in setup() 114 UserHandle userHandle = new UserHandle(UserHandle.USER_NULL); in onNotificationPosted_isHun_notForCurrentUser_ignoresTheEvent() 126 UserHandle userHandle = new UserHandle(UserHandle.USER_NULL); in onNotificationPosted_isNotHun_notForCurrentUser_ignoresTheEvent() 138 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isHun_isForCurrentUser_addsAlertEntryToDataManager() 149 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isHun_isForCurrentUser_doesNotAddItToActiveNotifications() 161 UserHandle userHandle = new UserHandle(UserHandle.USER_ALL); in onNotificationPosted_isHun_isForAllUsers_addsAlertEntryToDataManager() 172 UserHandle userHandle = new UserHandle(UserHandle.USER_ALL); in onNotificationPosted_isHun_isForAllUsers_doesNotAddItToActiveNotifications() 184 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isNotHun_isForCurrentUser_overrideGroupKeySet() 195 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isNotHun_isForCurrentUser_addsAlertEntryToDataManager() [all …]
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/ |
D | HealthConnectPermissionHelper.java | 32 import android.os.UserHandle; 98 @NonNull String packageName, @NonNull String permissionName, @NonNull UserHandle user) { in grantHealthPermission() 103 UserHandle checkedUser = UserHandle.of(handleIncomingUser(user.getIdentifier())); in grantHealthPermission() 127 @NonNull UserHandle user) { in revokeHealthPermission() 132 UserHandle checkedUser = UserHandle.of(handleIncomingUser(user.getIdentifier())); in revokeHealthPermission() 169 @NonNull String packageName, @Nullable String reason, @NonNull UserHandle user) { in revokeAllHealthPermissions() 172 UserHandle checkedUser = UserHandle.of(handleIncomingUser(user.getIdentifier())); in revokeAllHealthPermissions() 185 @NonNull String packageName, @NonNull UserHandle user) { in getGrantedHealthPermissions() 188 UserHandle checkedUser = UserHandle.of(handleIncomingUser(user.getIdentifier())); in getGrantedHealthPermissions() 202 @NonNull UserHandle user, in getHealthPermissionsFlags() [all …]
|
/packages/modules/AppSearch/service/java/com/android/server/appsearch/util/ |
D | ServiceImplHelper.java | 38 import android.os.UserHandle; 69 private final Set<UserHandle> mUnlockedUsersLocked = new ArraySet<>(); 75 private UserHandle mEnterpriseParentUserLocked; 79 private UserHandle mEnterpriseUserLocked; 89 public void setUserIsLocked(@NonNull UserHandle userHandle, boolean isLocked) { in setUserIsLocked() 91 UserHandle parentUser = isManagedProfile ? mUserManager.getProfileParent(userHandle) : null; in setUserIsLocked() 109 public boolean isUserLocked(@NonNull UserHandle callingUser) { in isUserLocked() 121 public void verifyUserUnlocked(@NonNull UserHandle callingUser) { in verifyUserUnlocked() 132 private UserHandle getEnterpriseUser(@NonNull UserHandle targetUser) { in getEnterpriseUser() 154 public UserHandle verifyIncomingCallWithCallback( in verifyIncomingCallWithCallback() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/sim/ |
D | EnableAutoDataSwitchDialogFragmentTest.java | 28 import android.os.UserHandle; 80 .isManagedProfile(UserHandle.MIN_SECONDARY_USER_ID); in setUp() 118 UserHandle userHandle = UserHandle.of(UserHandle.USER_NULL); in updateDialog_getMessage_noManagedProfile() 119 UserHandle userHandle2 = UserHandle.of(UserHandle.USER_SYSTEM); in updateDialog_getMessage_noManagedProfile() 129 UserHandle userHandle = UserHandle.of(UserHandle.USER_NULL); in updateDialog_getMessage_hasManagedProfile() 130 UserHandle userHandle2 = UserHandle.of(UserHandle.MIN_SECONDARY_USER_ID); in updateDialog_getMessage_hasManagedProfile() 140 UserHandle userHandle = UserHandle.of(UserHandle.MIN_SECONDARY_USER_ID); in updateDialog_getMessage_BothManagedProfile() 141 UserHandle userHandle2 = UserHandle.of(UserHandle.MIN_SECONDARY_USER_ID); in updateDialog_getMessage_BothManagedProfile()
|
/packages/services/Car/service/src/com/android/car/user/ |
D | UserHandleHelper.java | 23 import android.os.UserHandle; 46 public UserHandle getExistingUserHandle(@UserIdInt int userId) { in getExistingUserHandle() 47 List<UserHandle> users = UserManagerHelper.getUserHandles(mUserManager, in getExistingUserHandle() 50 for (UserHandle user : users) { in getExistingUserHandle() 60 public List<UserHandle> getEnabledProfiles(@UserIdInt int userId) { in getEnabledProfiles() 67 public boolean isGuestUser(UserHandle user) { in isGuestUser() 74 public boolean isAdminUser(UserHandle user) { in isAdminUser() 81 public boolean isEphemeralUser(UserHandle user) { in isEphemeralUser() 88 public boolean isEnabledUser(UserHandle user) { in isEnabledUser() 95 public boolean isManagedProfile(UserHandle user) { in isManagedProfile() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/ |
D | LocationInjectedServicesPreferenceControllerTest.java | 32 import android.os.UserHandle; 130 new int[]{UserHandle.myUserId(), fakeWorkProfileId}); in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly() 131 ShadowUserManager.getShadow().addProfile(new UserInfo(UserHandle.myUserId(), "", 0)); in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly() 143 UserHandle.of(fakeWorkProfileId), in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly() 149 ArgumentCaptor<ArraySet<UserHandle>> profilesArgumentCaptor = in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly() 154 .doesNotContain(UserHandle.of(fakeWorkProfileId)); in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly() 161 new int[]{UserHandle.myUserId(), fakeWorkProfileId}); in workProfileDisallowShareLocationOff_getAllUserLocationServices() 162 ShadowUserManager.getShadow().addProfile(new UserInfo(UserHandle.myUserId(), "", 0)); in workProfileDisallowShareLocationOff_getAllUserLocationServices() 171 UserHandle.of(fakeWorkProfileId), in workProfileDisallowShareLocationOff_getAllUserLocationServices() 176 ArgumentCaptor<ArraySet<UserHandle>> profilesArgumentCaptor = in workProfileDisallowShareLocationOff_getAllUserLocationServices() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
D | UserIdTest.java | 26 import android.os.UserHandle; 49 assertEquals(UserId.of(UserHandle.of(10)), UserId.of(UserHandle.of(10))); in testEquals() 59 assertFalse(UserId.of(UserHandle.of(0)).equals(UserId.of(UserHandle.of(10)))); in testNotEquals_differentUserHandle() 64 assertEquals(UserId.of(UserHandle.of(0)).hashCode(), in testHashCode_sameUserHandle() 65 UserId.of(UserHandle.of(0)).hashCode()); in testHashCode_sameUserHandle() 70 assertThat(UserId.of(UserHandle.of(0)).hashCode()).isNotEqualTo( in testHashCode_differentUserHandle() 71 UserId.of(UserHandle.of(10)).hashCode()); in testHashCode_differentUserHandle() 90 UserHandle differentUserHandle = UserHandle.of(UserHandle.myUserId() + 1); in testAsContext_differentUserShouldCreatePackageContextAsUser() 100 UserHandle userHandle = UserHandle.of(10); in testOf_UserIdUserHandleIdentifier() 121 assertThat(userId).isEqualTo(UserId.of(UserHandle.of(10))); in testRead_success() [all …]
|
/packages/modules/IntentResolver/tests/shared/src/com/android/intentresolver/platform/ |
D | FakeUserManager.kt | 26 import android.os.UserHandle in <lambda>() 71 override fun getProfileParent(userHandle: UserHandle): UserHandle? { in <lambda>() 74 state.getUserOrNull(UserHandle.of(user.profileGroupId))?.userHandle in <lambda>() 82 return state.getUserOrNull(UserHandle.of(userId)) in <lambda>() 95 @NonNull userHandle: UserHandle in <lambda>() 101 override fun isQuietModeEnabled(userHandle: UserHandle): Boolean { in <lambda>() 111 private val userInfoMap: MutableMap<UserHandle, UserInfo> = mutableMapOf() in <lambda>() 114 val primaryUserHandle: UserHandle in <lambda>() 135 val userHandles: List<UserHandle> in <lambda>() 145 private fun createPrimaryUser(id: Int): UserHandle { in <lambda>() [all …]
|
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/model/ |
D | RoleBehavior.java | 21 import android.os.UserHandle; 37 default void onRoleAddedAsUser(@NonNull Role role, @NonNull UserHandle user, in onRoleAddedAsUser() 43 default boolean isAvailableAsUser(@NonNull Role role, @NonNull UserHandle user, in isAvailableAsUser() 52 default List<String> getDefaultHoldersAsUser(@NonNull Role role, @NonNull UserHandle user, in getDefaultHoldersAsUser() 61 default String getFallbackHolderAsUser(@NonNull Role role, @NonNull UserHandle user, in getFallbackHolderAsUser() 80 @NonNull UserHandle user, @NonNull Context context) { in isPackageQualifiedAsUser() 88 default List<String> getQualifyingPackagesAsUser(@NonNull Role role, @NonNull UserHandle user, in getQualifyingPackagesAsUser() 97 @NonNull UserHandle user, @NonNull Context context) {} in grantAsUser() 103 @NonNull UserHandle user, @NonNull Context context) {} in revokeAsUser() 109 @NonNull UserHandle user, @NonNull Context context) {} in onHolderSelectedAsUser() [all …]
|
/packages/apps/TvSettings/unbundle/java/com/android/tv/settings/unbundle/sdklib/ |
D | UserHandleCompat.java | 18 import android.os.UserHandle; 21 public UserHandle mHandle; 23 public UserHandleCompat(UserHandle handle) { in UserHandleCompat() 28 this.mHandle = new UserHandle(userId); in UserHandleCompat() 32 return UserHandle.isSameApp(uid1, uid2); in isSameApp() 37 return UserHandle.getUserId(uid); in getUserId() 41 int USER_OWNER = UserHandle.USER_OWNER; 44 int USER_NULL = UserHandle.USER_NULL; 47 int USER_SYSTEM = UserHandle.USER_SYSTEM;
|
/packages/modules/HealthFitness/framework/java/android/health/connect/aidl/ |
D | IHealthConnectService.aidl | 41 import android.os.UserHandle; 51 void grantHealthPermission(String packageName, String permissionName, in UserHandle user); in grantHealthPermission() 52 …vokeHealthPermission(String packageName, String permissionName, String reason, in UserHandle user); in revokeHealthPermission() 53 void revokeAllHealthPermissions(String packageName, String reason, in UserHandle user); in revokeAllHealthPermissions() 54 List<String> getGrantedHealthPermissions(String packageName, in UserHandle user); in getGrantedHealthPermissions() 60 …Map getHealthPermissionsFlags(String packageName, in UserHandle user, in List<String> permissions); in getHealthPermissionsFlags() 65 …void setHealthPermissionsUserFixedFlagValue(String packageName, in UserHandle user, in List<String… in setHealthPermissionsUserFixedFlagValue() 68 long getHistoricalAccessStartDateInMilliseconds(String packageName, in UserHandle user); in getHistoricalAccessStartDateInMilliseconds() 181 in UserHandle userHandle, in setRecordRetentionPeriodInDays() 185 int getRecordRetentionPeriodInDays(in UserHandle userHandle); in getRecordRetentionPeriodInDays() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/profileselector/ |
D | UserAdapterTest.java | 28 import android.os.UserHandle; 60 private final int mPersonalUserId = UserHandle.myUserId(); 100 when(mUserManager.getUserProperties(UserHandle.of(mPersonalUserId))) in setUp() 102 when(mUserManager.getUserProperties(UserHandle.of(WORK_USER_ID))) in setUp() 104 when(mUserManager.getUserProperties(UserHandle.of(PRIVATE_USER_ID))) in setUp() 111 Lists.newArrayList(UserHandle.of(mPersonalUserId))); in createUserSpinnerAdapter_singleProfile_returnsNull() 122 Lists.newArrayList(UserHandle.of(mPersonalUserId), UserHandle.of(WORK_USER_ID))); in createUserSpinnerAdapter_twoProfiles_succeed() 140 UserHandle.of(mPersonalUserId), in createUserSpinnerAdapter_withWorkAndPrivateProfiles_shouldSucceed() 141 UserHandle.of(WORK_USER_ID), in createUserSpinnerAdapter_withWorkAndPrivateProfiles_shouldSucceed() 142 UserHandle.of(PRIVATE_USER_ID))); in createUserSpinnerAdapter_withWorkAndPrivateProfiles_shouldSucceed() [all …]
|
/packages/services/Car/car-builtin-lib/src/android/car/builtin/os/ |
D | UserManagerHelper.java | 25 import android.os.UserHandle; 43 public static final @UserIdInt int USER_NULL = UserHandle.USER_NULL; 46 public static final @UserIdInt int USER_SYSTEM = UserHandle.USER_SYSTEM; 49 public static final @UserIdInt int USER_ALL = UserHandle.USER_ALL; 70 public static List<UserHandle> getUserHandles(@NonNull UserManager userManager, in getUserHandles() 82 public static List<UserHandle> getUserHandles(@NonNull UserManager userManager, in getUserHandles() 87 List<UserHandle> result = new ArrayList<>(users.size()); in getUserHandles() 98 @NonNull UserHandle user) { in isEphemeralUser() 103 public static boolean isGuestUser(@NonNull UserManager userManager, @NonNull UserHandle user) { in isGuestUser() 108 public static boolean isFullUser(@NonNull UserManager userManager, @NonNull UserHandle user) { in isFullUser() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/utils/ |
D | UserUtils.java | 21 import android.os.UserHandle; 47 public static UserHandle getWorkProfile(@NonNull Context context) { in getWorkProfile() 49 List<UserHandle> profiles = userManager.getUserProfiles(); in getWorkProfile() 50 UserHandle user = Process.myUserHandle(); in getWorkProfile() 54 UserHandle profile = profiles.get(i); in getWorkProfile() 75 public static UserHandle getPrivateProfile(@NonNull Context context) { in getPrivateProfile() 80 List<UserHandle> profiles = context.getSystemService(UserManager.class).getUserProfiles(); in getPrivateProfile() 81 UserHandle user = Process.myUserHandle(); in getPrivateProfile() 85 UserHandle profile = profiles.get(i); in getPrivateProfile() 97 private static boolean isPrivateProfile(@NonNull UserHandle userHandle, in isPrivateProfile() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/ota/ |
D | OtaControllerTest.java | 31 import android.os.UserHandle; 99 when(mUserManager.getProfiles(UserHandle.USER_SYSTEM)).thenReturn(mProfiles); in setUp() 113 setDeviceOwner(UserHandle.USER_SYSTEM, ADMIN_COMPONENT); in testDeviceOwnerSystemUser() 120 Pair.create(UserHandle.USER_SYSTEM, MigrateSystemAppsSnapshotTask.class), in testDeviceOwnerSystemUser() 121 Pair.create(UserHandle.USER_SYSTEM, DeleteNonRequiredAppsTask.class), in testDeviceOwnerSystemUser() 122 Pair.create(UserHandle.USER_SYSTEM, DisallowAddUserTask.class), in testDeviceOwnerSystemUser() 123 Pair.create(UserHandle.USER_SYSTEM, UpdateInteractAcrossProfilesAppOpTask.class)); in testDeviceOwnerSystemUser() 126 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testDeviceOwnerSystemUser() 143 Pair.create(UserHandle.USER_SYSTEM, MigrateSystemAppsSnapshotTask.class), in testManagedProfileWithoutMissingSystemIme() 146 Pair.create(UserHandle.USER_SYSTEM, UpdateInteractAcrossProfilesAppOpTask.class)); in testManagedProfileWithoutMissingSystemIme() [all …]
|
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/ |
D | UtilsTest.java | 23 import android.os.UserHandle; 59 UserHandle[] userHandles = new UserHandle[] { in testGetManagedProfile() 60 new UserHandle(TEST_PRIMARY_USER_ID), in testGetManagedProfile() 61 new UserHandle(TEST_MANAGED_PROFILE_ID) in testGetManagedProfile() 64 .thenReturn(new ArrayList<UserHandle>(Arrays.asList(userHandles))); in testGetManagedProfile() 71 UserHandle[] userHandles = new UserHandle[] { in testGetManagedProfile_notPresent() 72 new UserHandle(TEST_PRIMARY_USER_ID) in testGetManagedProfile_notPresent() 75 .thenReturn(new ArrayList<UserHandle>(Arrays.asList(userHandles))); in testGetManagedProfile_notPresent()
|
/packages/apps/Settings/src/com/android/settings/nfc/ |
D | PaymentBackend.java | 30 import android.os.UserHandle; 53 public UserHandle userHandle; 96 UserHandle.of(ActivityManager.getCurrentUser()), /*flags=*/0) in refresh() 98 List<UserHandle> userHandles = um.getEnabledProfiles(); in refresh() 102 for (UserHandle uh : userHandles) { in refresh() 174 Settings.Secure.NFC_PAYMENT_FOREGROUND, UserHandle.myUserId()) != 0; in isForegroundMode() 182 UserHandle.of(UserHandle.myUserId()), /*flags=*/0) in setForegroundMode() 184 List<UserHandle> userHandles = um.getEnabledProfiles(); in setForegroundMode() 185 for (UserHandle uh : userHandles) { in setForegroundMode() 193 UserHandle.of(ActivityManager.getCurrentUser()), /*flags=*/0) in getDefaultPaymentApp() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/pm/ |
D | UserCache.java | 25 import android.os.UserHandle; 76 private final List<BiConsumer<UserHandle, String>> mUserEventListeners = new ArrayList<>(); 83 private Map<UserHandle, UserIconInfo> mUserToSerialMap; 86 private Map<UserHandle, List<String>> mUserToPreInstallAppMap; 117 UserHandle user = intent.getParcelableExtra(Intent.EXTRA_USER); in onUsersChanged() 132 private Map<UserHandle, List<String>> fetchPreInstallApps() { in fetchPreInstallApps() 133 Map<UserHandle, List<String>> userToPreInstallApp = new ArrayMap<>(); in fetchPreInstallApps() 147 public SafeCloseable addUserEventListener(BiConsumer<UserHandle, String> listener) { in addUserEventListener() argument 155 public long getSerialNumberForUser(UserHandle user) { in getSerialNumberForUser() 163 public UserIconInfo getUserInfo(UserHandle user) { in getUserInfo() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | ModelLauncherCallbacks.kt | 21 import android.os.UserHandle 40 override fun onPackageAdded(packageName: String, user: UserHandle) { in onPackageAdded() 44 override fun onPackageChanged(packageName: String, user: UserHandle) { in onPackageChanged() 50 user: UserHandle, in onPackageLoadingProgressChanged() 56 override fun onPackageRemoved(packageName: String, user: UserHandle) { in onPackageRemoved() 63 user: UserHandle, in onPackagesAvailable() 69 override fun onPackagesSuspended(vararg packageNames: String, user: UserHandle) { in onPackagesSuspended() 75 user: UserHandle, in onPackagesUnavailable() 83 override fun onPackagesUnsuspended(vararg packageNames: String, user: UserHandle) { in onPackagesUnsuspended() 90 user: UserHandle in onShortcutsChanged() [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | UserCache.java | 30 import android.os.UserHandle; 74 final ArrayList<UserHandle> mUsers = new ArrayList<>(); 85 List<UserHandle> profiles = mUserManager.getEnabledProfiles(); in update() 101 for (UserHandle profile : profiles) { in update() 112 private boolean isUnlockedAndMediaSharedWithParent(@NonNull UserHandle profile) { in isUnlockedAndMediaSharedWithParent() 119 public @NonNull List<UserHandle> updateAndGetUsers() { in updateAndGetUsers() 122 return (List<UserHandle>) mUsers.clone(); in updateAndGetUsers() 126 public @NonNull List<UserHandle> getUsersCached() { in getUsersCached() 128 return (List<UserHandle>) mUsers.clone(); in getUsersCached() 145 Context userContext = getContextForUser(UserHandle.of(userId)); in isWorkProfile() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | ExternalSourcesDetailsTest.java | 31 import android.os.UserHandle; 129 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 143 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 168 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference() 182 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference() 207 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference() 209 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference() 223 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference() 226 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference()
|