/packages/apps/Car/Notification/tests/robotests/src/com/android/car/notification/ |
D | CarNotificationListenerTest.java | 31 import android.os.UserHandle; 91 UserHandle userHandle = new UserHandle(UserHandle.USER_NULL); in onNotificationPosted_isHun_notForCurrentUser_ignoresTheEvent() 103 UserHandle userHandle = new UserHandle(UserHandle.USER_NULL); in onNotificationPosted_isNotHun_notForCurrentUser_ignoresTheEvent() 115 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isHun_isForCurrentUser_addsAlertEntryToDataManager() 126 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isHun_isForCurrentUser_doesNotAddItToActiveNotifications() 138 UserHandle userHandle = new UserHandle(UserHandle.USER_ALL); in onNotificationPosted_isHun_isForAllUsers_addsAlertEntryToDataManager() 149 UserHandle userHandle = new UserHandle(UserHandle.USER_ALL); in onNotificationPosted_isHun_isForAllUsers_doesNotAddItToActiveNotifications() 162 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isNotHun_isForCurrentUser_addsAlertEntryToDataManager() 173 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isNotHun_isForCurrentUser_addsItToActiveNotifications() 185 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_lowPriority_isForCurrentUser_untracksUnseenNotification() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/specialaccess/ |
D | AppStateAppOpsBridgeTest.java | 34 import android.os.UserHandle; 86 eq(UserHandle.myUserId()))) in setUp() 98 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in androidPackagesIgnored() 111 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in selfPackageIgnored() 124 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in packagesNotRequestingPermissionIgnored() 129 UserHandle.myUserId())).thenReturn(true); in packagesNotRequestingPermissionIgnored() 140 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in unavailablePackageIgnored() 144 UserHandle.myUserId())).thenReturn(false); in unavailablePackageIgnored() 155 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in loadsAppOpsExtraInfo_modeAllowed_isPermissible() 170 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in loadsAppOpsExtraInfo_modeDefault_isPermissible() [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/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/ota/ |
D | OtaControllerTest.java | 31 import android.os.UserHandle; 102 when(mUserManager.getProfiles(UserHandle.USER_SYSTEM)).thenReturn(mProfiles); in setUp() 116 setDeviceOwner(UserHandle.USER_SYSTEM, ADMIN_COMPONENT); in testDeviceOwnerSystemUser() 123 Pair.create(UserHandle.USER_SYSTEM, MigrateSystemAppsSnapshotTask.class), in testDeviceOwnerSystemUser() 124 Pair.create(UserHandle.USER_SYSTEM, DeleteNonRequiredAppsTask.class), in testDeviceOwnerSystemUser() 125 Pair.create(UserHandle.USER_SYSTEM, DisallowAddUserTask.class), in testDeviceOwnerSystemUser() 126 Pair.create(UserHandle.USER_SYSTEM, UpdateInteractAcrossProfilesAppOpTask.class)); in testDeviceOwnerSystemUser() 129 verify(mCrossProfileIntentFiltersSetter).resetFilters(UserHandle.USER_SYSTEM); in testDeviceOwnerSystemUser() 147 Pair.create(UserHandle.USER_SYSTEM, MigrateSystemAppsSnapshotTask.class), in testDeviceOwnerSeparate() 150 Pair.create(UserHandle.USER_SYSTEM, UpdateInteractAcrossProfilesAppOpTask.class)); in testDeviceOwnerSeparate() [all …]
|
/packages/services/Car/service/src/com/android/car/pm/ |
D | VendorServiceController.java | 35 import android.os.UserHandle; 160 if (connectedUserId != UserHandle.USER_SYSTEM && connectedUserId != userId) { in doSwitchUser() 165 if (userId != UserHandle.USER_SYSTEM) { in doSwitchUser() 166 startOrBindServicesForUser(UserHandle.of(userId)); in doSwitchUser() 179 if (unlocked && (userId == currentUserId || userId == UserHandle.USER_SYSTEM)) { in doUserLockChanged() 180 startOrBindServicesForUser(UserHandle.of(userId)); in doUserLockChanged() 181 } else if (!unlocked && userId != UserHandle.USER_SYSTEM) { in doUserLockChanged() 190 private void startOrBindServicesForUser(UserHandle user) { in startOrBindServicesForUser() 192 boolean systemUser = UserHandle.SYSTEM.equals(user); in startOrBindServicesForUser() 207 startOrBindServicesForUser(UserHandle.SYSTEM); in startOrBindServicesIfNeeded() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | ExternalSourcesDetailsTest.java | 37 import android.os.UserHandle; 94 assertThat(UserHandle.isCore(mockUid)).isFalse(); in setCanInstallApps_false_shouldKillNonCoreUid() 106 assertThat(UserHandle.isCore(mockUid)).isTrue(); in setCanInstallApps_false_shouldNotKillCoreUid() 176 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 190 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 215 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference() 229 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference() 254 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference() 256 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference() 270 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference() [all …]
|
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/interactacrossprofiles/ |
D | InteractAcrossProfilesSettings.java | 29 import android.os.UserHandle; 75 final ArrayList<Pair<ApplicationInfo, UserHandle>> crossProfileApps = in onResume() 79 for (final Pair<ApplicationInfo, UserHandle> appData : crossProfileApps) { in onResume() 81 final UserHandle user = appData.second; in onResume() 127 static ArrayList<Pair<ApplicationInfo, UserHandle>> collectConfigurableApps( in collectConfigurableApps() 130 final UserHandle workProfile = getWorkProfile(userManager); in collectConfigurableApps() 134 final UserHandle personalProfile = userManager.getProfileParent(workProfile); in collectConfigurableApps() 139 final ArrayList<Pair<ApplicationInfo, UserHandle>> apps = new ArrayList<>(); in collectConfigurableApps() 151 PackageManager packageManager, UserHandle personalProfile, UserHandle workProfile) { in getAllInstalledPackages() 172 UserHandle workProfile = getWorkProfile(userManager); in getNumberOfEnabledApps() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/ |
D | UtilsTest.java | 23 import android.os.UserHandle; 58 UserHandle[] userHandles = new UserHandle[] { in testGetManagedProfile() 59 new UserHandle(TEST_PRIMARY_USER_ID), in testGetManagedProfile() 60 new UserHandle(TEST_MANAGED_PROFILE_ID) in testGetManagedProfile() 63 .thenReturn(new ArrayList<UserHandle>(Arrays.asList(userHandles))); in testGetManagedProfile() 70 UserHandle[] userHandles = new UserHandle[] { in testGetManagedProfile_notPresent() 71 new UserHandle(TEST_PRIMARY_USER_ID) in testGetManagedProfile_notPresent() 74 .thenReturn(new ArrayList<UserHandle>(Arrays.asList(userHandles))); in testGetManagedProfile_notPresent()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/ |
D | Utils.java | 66 import android.os.UserHandle; 395 public static UserHandle getManagedProfile(UserManager userManager) { in getManagedProfile() 396 List<UserHandle> userProfiles = userManager.getUserProfiles(); in getManagedProfile() 397 for (UserHandle profile : userProfiles) { in getManagedProfile() 413 public static UserHandle getManagedProfileWithDisabled(UserManager userManager) { in getManagedProfileWithDisabled() 419 final int myUserId = UserHandle.myUserId(); in getManagedProfileWithDisabled() 444 return UserHandle.USER_NULL; in getManagedProfileId() 462 public static UserHandle getSecureTargetUser(IBinder activityToken, in getSecureTargetUser() 464 UserHandle currentUser = new UserHandle(UserHandle.myUserId()); in getSecureTargetUser() 470 UserHandle launchedFromUser = new UserHandle(UserHandle.getUserId( in getSecureTargetUser() [all …]
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/ |
D | HeadsetStateMachineTest.java | 35 import android.os.UserHandle; 174 mIntentArgument.capture(), eq(UserHandle.ALL), eq(HeadsetService.BLUETOOTH_PERM)); in testStateTransition_DisconnectedToConnecting_Connect() 191 mIntentArgument.capture(), eq(UserHandle.ALL), eq(HeadsetService.BLUETOOTH_PERM)); in testStateTransition_DisconnectedToConnecting_StackConnected() 208 mIntentArgument.capture(), eq(UserHandle.ALL), eq(HeadsetService.BLUETOOTH_PERM)); in testStateTransition_DisconnectedToConnecting_StackConnecting() 230 any(Intent.class), any(UserHandle.class), anyString()); in testStateTransition_ConnectingToDisconnected_StackDisconnected() 242 mIntentArgument.capture(), eq(UserHandle.ALL), eq(HeadsetService.BLUETOOTH_PERM)); in testStateTransition_ConnectingToDisconnected_StackDisconnected() 260 eq(UserHandle.ALL), eq(HeadsetService.BLUETOOTH_PERM)); in testStateTransition_ConnectingToDisconnected_Timeout() 281 any(Intent.class), any(UserHandle.class), anyString()); in testStateTransition_ConnectingToConnected_StackSlcConnected() 292 any(Intent.class), any(UserHandle.class), anyString()); in testStateTransition_ConnectingToConnected_StackSlcConnected() 303 mIntentArgument.capture(), eq(UserHandle.ALL), eq(HeadsetService.BLUETOOTH_PERM)); in testStateTransition_ConnectingToConnected_StackSlcConnected() [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | CallLogManagerTest.java | 47 import android.os.UserHandle; 131 UserHandle.of(CURRENT_USER_ID) in setUp() 137 UserHandle.of(OTHER_USER_ID) in setUp() 143 UserHandle.of(MANAGED_USER_ID) in setUp() 149 UserHandle.of(CURRENT_USER_ID) in setUp() 168 when(userManager.isUserRunning(any(UserHandle.class))).thenReturn(true); in setUp() 169 when(userManager.isUserUnlocked(any(UserHandle.class))).thenReturn(true); in setUp() 170 when(userManager.hasUserRestriction(any(String.class), any(UserHandle.class))) in setUp() 199 UserHandle.of(CURRENT_USER_ID) in testDontLogCancelledCall() 223 UserHandle.of(CURRENT_USER_ID) in testDontLogChoosingAccountCall() [all …]
|
D | TelecomServiceImplTest.java | 39 import android.os.UserHandle; 180 private static final UserHandle USER_HANDLE_16 = new UserHandle(16); 181 private static final UserHandle USER_HANDLE_17 = new UserHandle(17); 204 doNothing().when(mContext).sendBroadcastAsUser(any(Intent.class), any(UserHandle.class), in setUp() 218 public UserCallIntentProcessor create(Context context, UserHandle userHandle) { in setUp() 252 .getOutgoingPhoneAccountForScheme(eq("tel"), any(UserHandle.class))) in testGetDefaultOutgoingPhoneAccount() 255 .getOutgoingPhoneAccountForScheme(eq("sip"), any(UserHandle.class))) in testGetDefaultOutgoingPhoneAccount() 261 eq(TEL_PA_HANDLE_CURRENT), any(UserHandle.class)); in testGetDefaultOutgoingPhoneAccount() 278 .getOutgoingPhoneAccountForScheme(eq("tel"), any(UserHandle.class))) in testGetDefaultOutgoingPhoneAccountSucceedsIfCallerIsSimCallManager() 281 .getOutgoingPhoneAccountForScheme(eq("sip"), any(UserHandle.class))) in testGetDefaultOutgoingPhoneAccountSucceedsIfCallerIsSimCallManager() [all …]
|
/packages/apps/Settings/src/com/android/settings/ |
D | Utils.java | 68 import android.os.UserHandle; 388 public static UserHandle getManagedProfile(UserManager userManager) { in getManagedProfile() 389 final List<UserHandle> userProfiles = userManager.getUserProfiles(); in getManagedProfile() 390 for (UserHandle profile : userProfiles) { in getManagedProfile() 406 public static UserHandle getManagedProfileWithDisabled(UserManager userManager) { in getManagedProfileWithDisabled() 412 final int myUserId = UserHandle.myUserId(); in getManagedProfileWithDisabled() 437 return UserHandle.USER_NULL; in getManagedProfileId() 455 public static UserHandle getSecureTargetUser(IBinder activityToken, in getSecureTargetUser() 457 final UserHandle currentUser = new UserHandle(UserHandle.myUserId()); in getSecureTargetUser() 464 final UserHandle launchedFromUser = new UserHandle(UserHandle.getUserId( in getSecureTargetUser() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/ |
D | DashboardFeatureProviderImplTest.java | 53 import android.os.UserHandle; 209 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector() 210 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector() 224 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent() 237 .startActivityForResultAsUser(any(Intent.class), anyInt(), any(UserHandle.class)); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent() 246 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_toInternalSettingActivity_shouldBindToDirectLaunchIntentAndNotLog() 255 .startActivityForResultAsUser(any(Intent.class), anyInt(), any(UserHandle.class)); in bindPreference_toInternalSettingActivity_shouldBindToDirectLaunchIntentAndNotLog() 502 final ArrayList<UserHandle> handles = new ArrayList<>(); in openTileIntent_profileSelectionDialog_shouldShow() 503 handles.add(new UserHandle(0)); in openTileIntent_profileSelectionDialog_shouldShow() 504 handles.add(new UserHandle(10)); in openTileIntent_profileSelectionDialog_shouldShow() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/defaultapps/ |
D | DefaultAutofillPickerTest.java | 36 import android.os.UserHandle; 113 mPicker, "mUserId", MAIN_PROFILE_UID * UserHandle.PER_USER_RANGE); in setAndGetDefaultAppKey_shouldUpdateDefaultAutoFill() 116 mPicker, "mUserId", MANAGED_PROFILE_UID * UserHandle.PER_USER_RANGE); in setAndGetDefaultAppKey_shouldUpdateDefaultAutoFill() 120 mPicker, "mUserId", MAIN_PROFILE_UID * UserHandle.PER_USER_RANGE); in setAndGetDefaultAppKey_shouldUpdateDefaultAutoFill() 123 mPicker, "mUserId", MANAGED_PROFILE_UID * UserHandle.PER_USER_RANGE); in setAndGetDefaultAppKey_shouldUpdateDefaultAutoFill() 141 ShadowProcess.setUid(MANAGED_PROFILE_UID * UserHandle.PER_USER_RANGE); in mUserId_shouldDeriveUidFromManagedCaller() 154 ShadowProcess.setUid(MAIN_PROFILE_UID * UserHandle.PER_USER_RANGE); in mUserId_shouldDeriveUidFromMainCaller() 167 ShadowProcess.setUid(MAIN_PROFILE_UID * UserHandle.PER_USER_RANGE); in mUserId_shouldDeriveUidFromManagedClick() 180 ShadowProcess.setUid(MAIN_PROFILE_UID * UserHandle.PER_USER_RANGE); in mUserId_shouldDeriveUidFromMainClick() 189 UserHandle mainUserHandle = new UserHandle(MAIN_PROFILE_UID); in setupUserManager() [all …]
|
/packages/apps/PermissionController/src/com/android/permissioncontroller/role/model/ |
D | RoleBehavior.java | 22 import android.os.UserHandle; 46 default boolean isAvailableAsUser(@NonNull Role role, @NonNull UserHandle user, in isAvailableAsUser() 70 default boolean isVisibleAsUser(@NonNull Role role, @NonNull UserHandle user, in isVisibleAsUser() 79 default Intent getManageIntentAsUser(@NonNull Role role, @NonNull UserHandle user, in getManageIntentAsUser() 88 @NonNull TwoTargetPreference preference, @NonNull UserHandle user, in preparePreferenceAsUser() 95 @NonNull ApplicationInfo applicationInfo, @NonNull UserHandle user, in isApplicationVisibleAsUser() 106 @NonNull UserHandle user, @NonNull Context context) {} in prepareApplicationPreferenceAsUser() 121 default List<String> getQualifyingPackagesAsUser(@NonNull Role role, @NonNull UserHandle user, in getQualifyingPackagesAsUser() 150 @NonNull UserHandle user, @NonNull Context context) {} in onHolderSelectedAsUser() 155 default void onHolderChangedAsUser(@NonNull Role role, @NonNull UserHandle user, in onHolderChangedAsUser()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/ |
D | LocationServicePreferenceControllerTest.java | 31 import android.os.UserHandle; 126 map.put(UserHandle.myUserId(), preferences); in updateState_shouldRemoveAllAndAddInjectedSettings() 130 ShadowUserManager.getShadow().setProfileIdsWithDisabled(new int[]{UserHandle.myUserId()}); in updateState_shouldRemoveAllAndAddInjectedSettings() 145 new int[]{UserHandle.myUserId(), fakeWorkProfileId}); in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly() 155 UserHandle.of(fakeWorkProfileId), in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly() 162 any(Context.class), eq(UserHandle.myUserId())); in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly() 169 new int[]{UserHandle.myUserId(), fakeWorkProfileId}); in workProfileDisallowShareLocationOff_getAllUserLocationServices() 176 UserHandle.of(fakeWorkProfileId), in workProfileDisallowShareLocationOff_getAllUserLocationServices() 182 any(Context.class), eq(UserHandle.USER_CURRENT)); in workProfileDisallowShareLocationOff_getAllUserLocationServices() 200 map.put(UserHandle.myUserId(), preferences); in withUserRestriction_shouldDisableLocationAccuracy() [all …]
|
/packages/services/Telecomm/src/com/android/server/telecom/ui/ |
D | MissedCallNotifierImpl.java | 55 import android.os.UserHandle; 133 private UserHandle mCurrentUserHandle; 136 private ConcurrentMap<UserHandle, AtomicInteger> mMissedCallCounts; 138 private List<UserHandle> mUsersToLoadAfterBootComplete = new ArrayList<>(); 162 public void clearMissedCalls(UserHandle userHandle) { in clearMissedCalls() 171 private void markMissedCallsAsRead(final UserHandle userHandle) { in markMissedCallsAsRead() 207 private Intent getShowMissedCallIntentForDefaultDialer(UserHandle userHandle) { in getShowMissedCallIntentForDefaultDialer() 217 private boolean shouldManageNotificationThroughDefaultDialer(UserHandle userHandle) { in shouldManageNotificationThroughDefaultDialer() 228 private void sendNotificationThroughDefaultDialer(CallInfo callInfo, UserHandle userHandle) { in sendNotificationThroughDefaultDialer() 264 UserHandle userHandle; in showMissedCallNotification() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | WorkSoundPreferenceControllerTest.java | 30 import android.os.UserHandle; 96 .thenReturn(UserHandle.myUserId()); in isAvailable_managedProfileAndNotSingleVolume_shouldReturnTrue() 106 .thenReturn(UserHandle.USER_NULL); in isAvailable_noManagedProfile_shouldReturnFalse() 116 .thenReturn(UserHandle.myUserId()); in isAvailable_singleVolume_shouldReturnFalse() 130 .thenReturn(UserHandle.USER_NULL); in onManagedProfileAdded_shouldDisplayPreferenceCategory() 139 .thenReturn(UserHandle.myUserId()); in onManagedProfileAdded_shouldDisplayPreferenceCategory() 140 mController.onManagedProfileAdded(UserHandle.myUserId()); in onManagedProfileAdded_shouldDisplayPreferenceCategory() 152 .thenReturn(UserHandle.myUserId()); in onManagedProfileRemoved_shouldHidePreferenceCategory() 163 .thenReturn(UserHandle.USER_NULL); in onManagedProfileRemoved_shouldHidePreferenceCategory() 164 mController.onManagedProfileRemoved(UserHandle.myUserId()); in onManagedProfileRemoved_shouldHidePreferenceCategory() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/ |
D | Utils.java | 36 import android.os.UserHandle; 278 static int sSystemUiUid = UserHandle.USER_NULL; 283 static int sForegroundUserId = UserHandle.USER_NULL; 335 int callingUser = UserHandle.getCallingUserId(); in checkCaller() 338 || (UserHandle.getAppId(sSystemUiUid) == UserHandle.getAppId(callingUid)) in checkCaller() 339 || (UserHandle.getAppId(Process.SYSTEM_UID) == UserHandle.getAppId(callingUid)); in checkCaller() 346 int callingUser = UserHandle.getCallingUserId(); in checkCallerAllowManagedProfiles() 354 int parentUser = (ui != null) ? ui.id : UserHandle.USER_NULL; in checkCallerAllowManagedProfiles() 358 || (UserHandle.getAppId(sSystemUiUid) == UserHandle.getAppId(callingUid)) in checkCallerAllowManagedProfiles() 359 || (UserHandle.getAppId(Process.SYSTEM_UID) == UserHandle.getAppId(callingUid)); in checkCallerAllowManagedProfiles() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/pm/ |
D | UserCache.java | 21 import android.os.UserHandle; 48 private LongSparseArray<UserHandle> mUsers; 51 private ArrayMap<UserHandle, Long> mUserToSerialMap; 84 List<UserHandle> users = mUserManager.getUserProfiles(); in enableAndResetCache() 86 for (UserHandle user : users) { in enableAndResetCache() 111 public long getSerialNumberForUser(UserHandle user) { in getSerialNumberForUser() 124 public UserHandle getUserForSerialNumber(long serialNumber) { in getUserForSerialNumber() 136 public List<UserHandle> getUserProfiles() { in getUserProfiles() 143 List<UserHandle> users = mUserManager.getUserProfiles(); in getUserProfiles()
|
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/shadows/ |
D | LShadowLauncherApps.java | 33 import android.os.UserHandle; 60 protected List<ShortcutInfo> getShortcuts(LauncherApps.ShortcutQuery query, UserHandle user) { in getShortcuts() 69 protected boolean isPackageEnabled(String packageName, UserHandle user) { in isPackageEnabled() 74 protected boolean isActivityEnabled(ComponentName component, UserHandle user) { in isActivityEnabled() 79 protected LauncherActivityInfo resolveActivity(Intent intent, UserHandle user) { in resolveActivity() 86 ActivityInfo activityInfo, UserHandle user) { in getLauncherActivityInfo() 90 ClassParameter.from(UserHandle.class, user)); in getLauncherActivityInfo() 94 public ApplicationInfo getApplicationInfo(String packageName, int flags, UserHandle user) in getApplicationInfo() 101 public List<LauncherActivityInfo> getActivityList(String packageName, UserHandle user) { in getActivityList() 129 UserHandle user) { in getShortcutConfigActivityList()
|
/packages/services/Telephony/src/com/android/phone/ |
D | NotificationMgr.java | 39 import android.os.UserHandle; 378 List<UserHandle> users = getUsersExcludeDying(); in updateMwi() 379 for (UserHandle userHandle : users) { in updateMwi() 394 List<UserHandle> users = getUsersExcludeDying(); in updateMwi() 395 for (UserHandle userHandle : users) { in updateMwi() 411 private List<UserHandle> getUsersExcludeDying() { in getUsersExcludeDying() 414 List<UserHandle> users = new ArrayList<>(serialNumbersOfUsers.length); in getUsersExcludeDying() 421 private boolean hasUserRestriction(String restrictionKey, UserHandle userHandle) { in hasUserRestriction() 445 UserHandle userHandle, boolean isRefresh) { in maybeSendVoicemailNotificationUsingDefaultDialer() 480 private Intent getShowVoicemailIntentForDefaultDialer(UserHandle userHandle) { in getShowVoicemailIntentForDefaultDialer() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | RecentAppStatsMixinTest.java | 38 import android.os.UserHandle; 100 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() 131 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 133 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 135 when(mAppState.getEntry(stat3.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 167 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 169 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 171 when(mAppState.getEntry(stat3.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 198 when(mAppState.getEntry(stat.mPackageName, UserHandle.myUserId())).thenReturn(statEntry); in loadDisplayableRecentApps_oneInstantAppSet_shouldHaveOneRecentApp() 226 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_withNullAppEntryOrInfo_shouldNotCrash() [all …]
|
/packages/apps/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | AutoRevokedPackagesLiveData.kt | 20 import android.os.UserHandle in <lambda>() 34 : SmartUpdateMediatorLiveData<Map<Pair<String, UserHandle>, Set<String>>>() { in <lambda>() 43 mutableMapOf<Triple<String, String, UserHandle>, PermStateLiveData>() in <lambda>() 45 mutableMapOf<Pair<String, UserHandle>, PackagePermissionsLiveData>() in <lambda>() 47 mutableMapOf<Pair<String, UserHandle>, MutableSet<String>>() in <lambda>() 54 val packageNames = mutableListOf<Pair<String, UserHandle>>() in <lambda>() 95 val packageGroups = mutableListOf<Triple<String, String, UserHandle>>() in <lambda>() 162 mutableMapOf<Pair<String, UserHandle>, Set<String>>() in <lambda>() 175 : SmartUpdateMediatorLiveData<Map<Pair<String, UserHandle>, Set<String>>>() { 195 val unusedPackages = mutableMapOf<Pair<String, UserHandle>, Set<String>>() in onUpdate()
|