Home
last modified time | relevance | path

Searched refs:getIdentifier (Results 1 – 25 of 631) sorted by relevance

12345678910>>...26

/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/profileselector/
DProfileSelectDialogTest.java76 NORMAL_USER.getIdentifier(), "test_user", UserInfo.FLAG_RESTRICTED); in setUp()
77 when(mUserManager.getUserInfo(NORMAL_USER.getIdentifier())).thenReturn(userInfo); in setUp()
93 assertThat(tile.userHandle.get(0).getIdentifier()).isEqualTo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_Normal()
94 verify(mUserManager, never()).getUserInfo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_Normal()
107 assertThat(tile.userHandle.get(0).getIdentifier()).isEqualTo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_Remove()
108 verify(mUserManager, times(1)).getUserInfo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_Remove()
109 verify(mUserManager, times(2)).getUserInfo(REMOVED_USER.getIdentifier()); in updateUserHandlesIfNeeded_Remove()
114 final UserInfo userInfo = new UserInfo(CLONE_USER.getIdentifier(), "clone_user", null, in updateUserHandlesIfNeeded_removesCloneProfile()
116 when(mUserManager.getUserInfo(CLONE_USER.getIdentifier())).thenReturn(userInfo); in updateUserHandlesIfNeeded_removesCloneProfile()
124 assertThat(tile.userHandle.get(0).getIdentifier()).isEqualTo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_removesCloneProfile()
[all …]
DUserAdapterTest.java128 assertThat(userSpinnerAdapter.getUserHandle(0).getIdentifier()).isEqualTo(mPersonalUserId); in createUserSpinnerAdapter_twoProfiles_succeed()
129 assertThat(userSpinnerAdapter.getUserHandle(1).getIdentifier()).isEqualTo(WORK_USER_ID); in createUserSpinnerAdapter_twoProfiles_succeed()
148 assertThat(userSpinnerAdapter.getUserHandle(0).getIdentifier()).isEqualTo(mPersonalUserId); in createUserSpinnerAdapter_withWorkAndPrivateProfiles_shouldSucceed()
149 assertThat(userSpinnerAdapter.getUserHandle(1).getIdentifier()).isEqualTo(WORK_USER_ID); in createUserSpinnerAdapter_withWorkAndPrivateProfiles_shouldSucceed()
150 assertThat(userSpinnerAdapter.getUserHandle(2).getIdentifier()).isEqualTo(PRIVATE_USER_ID); in createUserSpinnerAdapter_withWorkAndPrivateProfiles_shouldSucceed()
170 assertThat(userSpinnerAdapter.getUserHandle(0).getIdentifier()).isEqualTo(mPersonalUserId); in createUserSpinnerAdapter_withWorkAndQuietPrivateProfile_shouldShowTwoProfiles()
171 assertThat(userSpinnerAdapter.getUserHandle(1).getIdentifier()).isEqualTo(WORK_USER_ID); in createUserSpinnerAdapter_withWorkAndQuietPrivateProfile_shouldShowTwoProfiles()
/packages/modules/Wifi/framework/tests/src/android/net/wifi/
DWifiStringResourceWrapperTest.java109 when(mResources.getIdentifier(eq(RES_NAME_1), eq("string"), any())).thenReturn(RES_ID_1); in setUp()
111 when(mResources.getIdentifier(eq(RES_NAME_1 + CARRIER_ID_RESOURCE_NAME_SUFFIX), in setUp()
114 when(mResources.getIdentifier(eq(RES_NAME_DISABLE_THRESHOLD), eq("integer"), any())) in setUp()
118 when(mResources.getIdentifier( in setUp()
124 when(mResources.getIdentifier(eq(RES_NAME_OOB_PSEUDONYM_ENABLED), eq("bool"), any())) in setUp()
128 when(mResources.getIdentifier( in setUp()
159 when(mResources.getIdentifier(eq(RES_NAME_1 + CARRIER_ID_RESOURCE_NAME_SUFFIX), in testCarrierIdWithBaseNoOverride()
165 when(mResources.getIdentifier( in testCarrierIdWithBaseNoOverride()
176 when(mResources.getIdentifier( in testCarrierIdWithBaseNoOverride()
192 when(mResources.getIdentifier(eq(RES_NAME_1 + CARRIER_ID_RESOURCE_NAME_SUFFIX), in testCarrierIdAvailable()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DUserLifecycleEventFilterTest.java42 USER_LIFECYCLE_EVENT_TYPE_STARTING, USER111.getIdentifier());
44 USER_LIFECYCLE_EVENT_TYPE_UNLOCKING, USER111.getIdentifier());
46 USER_LIFECYCLE_EVENT_TYPE_STARTING, USER112.getIdentifier());
48 USER_LIFECYCLE_EVENT_TYPE_SWITCHING, USER111.getIdentifier(), USER112.getIdentifier());
50 USER_LIFECYCLE_EVENT_TYPE_SWITCHING, USER112.getIdentifier(), USER113.getIdentifier());
112 .containsExactly(UserHandle.CURRENT.getIdentifier()); in testBuild_currentUser_notEvaluatedAtFilterCreation()
196 mockGetCurrentUser(USER112.getIdentifier()); in testApply_currentUserFilter()
207 mockGetCurrentUser(USER111.getIdentifier()); in testApply_currentUserFilter_evaluatedAtFilterApplyTime()
211 mockGetCurrentUser(USER112.getIdentifier()); in testApply_currentUserFilter_evaluatedAtFilterApplyTime()
DExperimentalCarUserServiceTest.java104 assertThat(result.getUser().getIdentifier()).isEqualTo(100); in testCreateAdminDriver_IfCurrentUserIsAdminUser()
129 assertThat(result.getUser().getIdentifier()).isEqualTo(100); in testCreateNonAdminDriver()
156 mockCreateProfile(driver.getIdentifier(), userName, null); in testCreatePassenger_IfMaximumProfileAlreadyCreated()
158 assertThat(mExperimentalCarUserService.createPassenger(userName, driver.getIdentifier())) in testCreatePassenger_IfMaximumProfileAlreadyCreated()
176 mockHalSwitch(mAdminUser.getIdentifier(), mRegularUser, mSwitchUserResponse); in testSwitchDriver()
287 assertThat(expected).contains(user.getIdentifier()); in testGetAllPossibleDrivers()
288 expected.remove(user.getIdentifier()); in testGetAllPossibleDrivers()
310 assertThat(expected).contains(user.getIdentifier()); in testGetAllPassengers()
311 expected.remove(user.getIdentifier()); in testGetAllPassengers()
/packages/modules/Media/apex/service/java/com/android/server/media/
DMediaCommunicationService.java128 int userId = targetUser.getUserHandle().getIdentifier(); in onUserStopped()
160 if (userId == ALL.getIdentifier()) { in getSession2TokensLocked()
206 mFullUserIds.put(user.getIdentifier(), parent.getIdentifier()); in updateUser()
208 mFullUserIds.put(user.getIdentifier(), user.getIdentifier()); in updateUser()
209 if (mUserRecords.get(user.getIdentifier()) == null) { in updateUser()
210 mUserRecords.put(user.getIdentifier(), in updateUser()
211 new FullUserRecord(user.getIdentifier())); in updateUser()
231 if (record.mUserId != ALL.getIdentifier() in dispatchSession2Created()
232 && record.mUserId != getUserHandleForUid(token.getUid()).getIdentifier()) { in dispatchSession2Created()
249 allSession2Tokens = getSession2TokensLocked(ALL.getIdentifier()); in dispatchSession2Changed()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/
DResourcesUtil.java30 int id = resources.getIdentifier(name, "string", SETTINGS_PACKAGE_NAME); in getString()
44 int id = resources.getIdentifier(name, "string", SETTINGS_PACKAGE_NAME); in getBoolean()
60 int id = resources.getIdentifier(name, "string", SETTINGS_PACKAGE_NAME); in getQuantityString()
74 int id = resources.getIdentifier(name, "string", SETTINGS_PACKAGE_NAME); in getString()
89 int id = resources.getIdentifier(name, "drawable", SETTINGS_PACKAGE_NAME); in getDrawable()
103 int id = resources.getIdentifier(name, "array", SETTINGS_PACKAGE_NAME); in getStringArray()
117 int id = resources.getIdentifier(name, "array", SETTINGS_PACKAGE_NAME); in getIntArray()
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/util/
DResourcesUtil.java30 int id = resources.getIdentifier(name, "string", SETTINGS_PACKAGE_NAME); in getString()
44 int id = resources.getIdentifier(name, "string", SETTINGS_PACKAGE_NAME); in getBoolean()
60 int id = resources.getIdentifier(name, "string", SETTINGS_PACKAGE_NAME); in getQuantityString()
74 int id = resources.getIdentifier(name, "string", SETTINGS_PACKAGE_NAME); in getString()
89 int id = resources.getIdentifier(name, "drawable", SETTINGS_PACKAGE_NAME); in getDrawable()
103 int id = resources.getIdentifier(name, "array", SETTINGS_PACKAGE_NAME); in getStringArray()
117 int id = resources.getIdentifier(name, "array", SETTINGS_PACKAGE_NAME); in getIntArray()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/dirlist/
DIconHelperTest.java90 assertThat(mIconHelper.shouldShowBadge(mSystemUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalse_onSystemUser()
95 assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isTrue(); in testShouldShowBadge_returnTrue_onManagedUser()
101 assertThat(mIconHelper.shouldShowBadge(mPrivateUser.getIdentifier())).isTrue(); in testShouldShowBadge_returnTrue_onPrivateUser()
109 assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalse_onManagedUser_doNotShowBadge()
117 assertThat(mIconHelper.shouldShowBadge(mPrivateUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalseOnPrivateUser_doNotShowBadge()
125 assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalseOnManagedUser_withoutManagedUser()
136 assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalseOnManagedUser_withoutMultipleUsers()
145 assertThat(mIconHelper.shouldShowBadge(mPrivateUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalseOnPrivateUser_withoutMultipleUsers()
/packages/modules/Permission/framework-s/java/android/app/role/
DRoleManager.java321 return mService.isRoleAvailableAsUser(roleName, user.getIdentifier()); in isRoleAvailable()
340 user.getIdentifier()); in isRoleHeld()
393 return mService.getRoleHoldersAsUser(roleName, user.getIdentifier()); in getRoleHoldersAsUser()
431 mService.addRoleHolderAsUser(roleName, packageName, flags, user.getIdentifier(), in addRoleHolderAsUser()
469 mService.removeRoleHolderAsUser(roleName, packageName, flags, user.getIdentifier(), in removeRoleHolderAsUser()
505 mService.clearRoleHoldersAsUser(roleName, flags, user.getIdentifier(), in clearRoleHoldersAsUser()
535 roleName, mContext.getUser().getIdentifier()); in getDefaultApplication()
571 mContext.getUser().getIdentifier(), createRemoteCallback(executor, callback)); in setDefaultApplication()
614 int userId = user.getIdentifier(); in addOnRoleHoldersChangedListenerAsUser()
659 int userId = user.getIdentifier(); in removeOnRoleHoldersChangedListenerAsUser()
[all …]
/packages/services/Car/service/src/com/android/car/user/
DInitialUserSetter.java408 .setSwitchUserId(newUser.getIdentifier()) in replaceUser()
411 if (newUser.getIdentifier() != currentUser.getIdentifier()) { in replaceUser()
412 Slogf.i(TAG, "Removing old guest %d", currentUser.getIdentifier()); in replaceUser()
414 Slogf.w(TAG, "Could not remove old guest " + currentUser.getIdentifier()); in replaceUser()
426 .setSwitchUserId(UserHandle.SYSTEM.getIdentifier()) in executeDefaultBehavior()
495 int actualUserId = actualUser.getIdentifier(); in switchUser()
530 if (LockPatternHelper.isSecure(mContext, user.getIdentifier())) { in canReplaceGuestUser()
533 + user.getIdentifier() + " has secure lock pattern"); in canReplaceGuestUser()
557 EventLogHelper.writeCarInitialUserReplaceGuest(user.getIdentifier()); in replaceGuestIfNeeded()
573 Slogf.w(TAG, "failed to mark guest " + user.getIdentifier() + " for deletion"); in replaceGuestIfNeeded()
[all …]
DUserHandleHelper.java51 if (user.getIdentifier() == userId) return user; in getExistingUserHandle()
68 return getUserContextAwareUserManager(user.getIdentifier()).isGuestUser(); in isGuestUser()
75 return getUserContextAwareUserManager(user.getIdentifier()).isAdminUser(); in isAdminUser()
96 return mUserManager.isManagedProfile(user.getIdentifier()); in isManagedProfile()
103 return getUserContextAwareUserManager(user.getIdentifier()).isProfile(); in isProfileUser()
/packages/apps/DocumentsUI/src/com/android/documentsui/
DUserManagerState.java240 UserHandle.of(userId.getIdentifier())); in onProfileActionStatusChange()
268 if (userId.getIdentifier() == ActivityManager.getCurrentUser() in onProfileActionStatusChange()
270 UserHandle.of(userId.getIdentifier())) in onProfileActionStatusChange()
299 .getUserProperties(UserHandle.of(userId.getIdentifier())) in areHiddenInQuietModeProfilesPresent()
339 if (userHandle.getIdentifier() == ActivityManager.getCurrentUser()) { in getUserIdsInternalPostV()
377 } else if (mUserManager.isManagedProfile(userHandle.getIdentifier())) { in getUserIdsInternalPreV()
423 if (mUserManager.isManagedProfile(userId.getIdentifier())) { in getUserIdToLabelMapInternalPreV()
439 if (userId.getIdentifier() == ActivityManager.getCurrentUser()) { in getProfileLabel()
444 UserHandle.of(userId.getIdentifier()), 0 /* flags */); in getProfileLabel()
507 if (mUserManager.isManagedProfile(userId.getIdentifier())) { in getUserIdToBadgeMapInternalPreV()
[all …]
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarDevicePolicyManagerTest.java134 mUserManager.isUserAdmin(user.getIdentifier())).isFalse(); in testCreateUser()
136 mUserManager.getUserInfo(user.getIdentifier()).name).isEqualTo(name); in testCreateUser()
139 removeUser(user.getIdentifier()); in testCreateUser()
159 mUserManager.isUserAdmin(user.getIdentifier())).isTrue(); in testCreateAdminUser()
161 mUserManager.getUserInfo(user.getIdentifier()).name).isEqualTo(name); in testCreateAdminUser()
165 removeUser(user.getIdentifier()); in testCreateAdminUser()
185 mUserManager.isGuestUser(user.getIdentifier())).isTrue(); in testCreateGuestUser()
187 mUserManager.isUserAdmin(user.getIdentifier())).isFalse(); in testCreateGuestUser()
189 mUserManager.getUserInfo(user.getIdentifier()).name).isEqualTo(name); in testCreateGuestUser()
193 removeUser(user.getIdentifier()); in testCreateGuestUser()
/packages/modules/Permission/framework-s/java/android/safetycenter/
DSafetyCenterManager.java380 mContext.getUser().getIdentifier()); in setSafetySourceData()
400 safetySourceId, mContext.getPackageName(), mContext.getUser().getIdentifier()); in getSafetySourceData()
427 mContext.getUser().getIdentifier()); in reportSafetySourceError()
445 mService.refreshSafetySources(refreshReason, mContext.getUser().getIdentifier()); in refreshSafetySources()
481 refreshReason, mContext.getUser().getIdentifier(), safetySourceIds); in refreshSafetySources()
507 mContext.getPackageName(), mContext.getUser().getIdentifier()); in getSafetyCenterData()
531 delegate, mContext.getPackageName(), mContext.getUser().getIdentifier()); in addOnSafetyCenterDataChangedListener()
555 delegate, mContext.getUser().getIdentifier()); in removeOnSafetyCenterDataChangedListener()
575 safetyCenterIssueId, mContext.getUser().getIdentifier()); in dismissSafetyCenterIssue()
598 mContext.getUser().getIdentifier()); in executeSafetyCenterIssueAction()
/packages/services/Car/car-lib/src/android/car/media/
DCarMediaManager.java93 return mService.getMediaSource(mode, getContext().getUser().getIdentifier()); in getMediaSource()
107 mService.setMediaSource(componentName, mode, getContext().getUser().getIdentifier()); in setMediaSource()
142 getContext().getUser().getIdentifier()); in addMediaSourceListener()
161 getContext().getUser().getIdentifier()); in removeMediaSourceListener()
177 return mService.getLastMediaSources(mode, getContext().getUser().getIdentifier()); in getLastMediaSources()
201 return mService.isIndependentPlaybackConfig(getContext().getUser().getIdentifier()); in isIndependentPlaybackConfig()
217 getContext().getUser().getIdentifier()); in setIndependentPlaybackConfig()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/customization/
DPartner.java77 final Integer id = getIdentifier(name, "integer"); in getInteger()
86 private Integer getIdentifier(String name, String defType) { in getIdentifier() method in Partner
91 return mResources.getIdentifier(name, defType, mPackage); in getIdentifier()
96 final Integer id = getIdentifier(name, "string"); in getString()
106 final Integer id = getIdentifier(name, "drawable"); in getDrawable()
116 final Integer id = getIdentifier(name, "array"); in getArray()
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/model/
DUserId.java90 public int getIdentifier() { in getIdentifier() method in UserId
91 return mUserHandle.getIdentifier(); in getIdentifier()
105 return userManager.isManagedProfile(mUserHandle.getIdentifier()); in isManagedProfile()
123 return Integer.hashCode(mUserHandle.getIdentifier()); in hashCode()
128 return String.valueOf(this.mUserHandle.getIdentifier()); in toString()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DCrossProfileCalendarPreferenceControllerTest.java78 when(mManagedUser.getIdentifier()).thenReturn(MANAGED_USER_ID); in setUp()
118 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier()); in updateStateToDisabled_isNotChecked()
128 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier()); in updateStateToEnabled_isChecked()
131 CROSS_PROFILE_CALENDAR_ENABLED, 1, mManagedUser.getIdentifier()); in updateStateToEnabled_isChecked()
141 CROSS_PROFILE_CALENDAR_ENABLED, 1, mManagedUser.getIdentifier())) in onPreferenceChangeToFalse_shouldUpdateProviderValue()
152 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier())) in onPreferenceChangeToTrue_shouldUpdateProviderValue()
/packages/services/Car/car-builtin-lib/src/android/car/builtin/os/
DUserManagerHelper.java99 return userManager.isUserEphemeral(user.getIdentifier()); in isEphemeralUser()
104 return userManager.isGuestUser(user.getIdentifier()); in isGuestUser()
109 UserInfo info = userManager.getUserInfo(user.getIdentifier()); in isFullUser()
118 return userManager.getUserInfo(user.getIdentifier()).isEnabled(); in isEnabledUser()
126 return userManager.getUserInfo(user.getIdentifier()).isInitialized(); in isInitializedUser()
157 return userManager.markGuestForDeletion(user.getIdentifier()); in markGuestForDeletion()
/packages/apps/Settings/src/com/android/settings/privatespace/
DPrivateSpaceMaintainer.java131 Log.i(TAG, "Private space created with id: " + mUserHandle.getIdentifier()); in createPrivateSpace()
151 Log.i(TAG, "Deleting Private space with id: " + mUserHandle.getIdentifier()); in deletePrivateSpace()
206 /* title= */ null, /* description= */null, mUserHandle.getIdentifier()); in getPrivateProfileLockCredentialIntent()
248 && mKeyguardManager.isDeviceSecure(mUserHandle.getIdentifier()); in isPrivateProfileLockSet()
330 Log.e(TAG, "Unexpected that " + mUserHandle.getIdentifier() + " is not a profile"); in startProfile()
348 mUserHandle.getIdentifier()); in setPrivateSpaceSensitiveNotificationsDefaultValue()
359 1, mUserHandle.getIdentifier()); in setUserSetupComplete()
388 1, mUserHandle.getIdentifier()); in setSkipFirstUseHints()
426 + userHandle.getIdentifier()); in onReceive()
/packages/apps/Settings/src/com/android/settings/nfc/
DPaymentBackend.java104 mCardEmuManager.getServices(CardEmulation.CATEGORY_PAYMENT, uh.getIdentifier()); in refresh()
121 && defaultAppName.userId == uh.getIdentifier(); in refresh()
187 Settings.Secure.NFC_PAYMENT_FOREGROUND, foreground ? 1 : 0, uh.getIdentifier()); in setForegroundMode()
197 ComponentName defaultApp = getDefaultPaymentApp(uh.getIdentifier()); in getDefaultPaymentApp()
200 appInfo.userId = uh.getIdentifier(); in getDefaultPaymentApp()
232 if (uh.getIdentifier() == userId) { in setDefaultPaymentApp()
235 app != null ? app.flattenToString() : null, uh.getIdentifier()); in setDefaultPaymentApp()
239 null, uh.getIdentifier()); in setDefaultPaymentApp()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/model/
DSystemStaticWallpaperInfo.java134 int listResId = stubApkResources.getIdentifier(categoryId + WALLPAPERS_RES_SUFFIX, in getAll()
139 int drawableResId = stubApkResources.getIdentifier(wallpaperResName, DRAWABLE_DEF_TYPE, in getAll()
141 int wallpaperTitleResId = stubApkResources.getIdentifier( in getAll()
143 int wallpaperSubtitle1ResId = stubApkResources.getIdentifier( in getAll()
146 int wallpaperSubtitle2ResId = stubApkResources.getIdentifier( in getAll()
149 int actionTypeResId = stubApkResources.getIdentifier( in getAll()
152 int actionUrlResId = stubApkResources.getIdentifier( in getAll()
155 int thumbnailResId = stubApkResources.getIdentifier( in getAll()
/packages/apps/ThemePicker/src/com/android/customization/model/
DResourcesApkProvider.java44 … int themesListResId = mStubApkResources.getIdentifier(arrayName, "array", mStubPackageName); in getItemsFromStub()
49 int resourceId = mStubApkResources.getIdentifier(String.format("%s%s", prefix, itemName), in getItemStringFromStub()
55 int resourceId = mStubApkResources.getIdentifier(String.format("%s%s", prefix, itemName), in getItemDrawableFromStub()
62 int resourceId = mStubApkResources.getIdentifier(String.format("%s%s", prefix, itemName), in getItemColorFromStub()
/packages/modules/Permission/service/java/com/android/permission/compat/
DUserHandleCompat.java29 public static final int USER_ALL = UserHandle.ALL.getIdentifier();
34 public static final int USER_SYSTEM = UserHandle.SYSTEM.getIdentifier();
46 return UserHandle.getUserHandleForUid(uid).getIdentifier(); in getUserId()

12345678910>>...26