Home
last modified time | relevance | path

Searched refs:getUser (Results 1 – 25 of 222) sorted by relevance

123456789

/packages/modules/Bluetooth/service/src/airplane/
DModeListener.kt176 getUser: () -> Context, in airplaneModeValueOverride()
184 if (isApmEnhancementEnabled(resolver) && hasUserToggledApm(getUser())) { in airplaneModeValueOverride()
186 if (isBluetoothOnAPM(getUser)) { in airplaneModeValueOverride()
187 val isWifiOn = isWifiOnApm(resolver, getUser) in airplaneModeValueOverride()
207 ToastNotification.displayIfNeeded(resolver, getUser) in airplaneModeValueOverride()
228 fun displayIfNeeded(resolver: ContentResolver, getUser: () -> Context) { in displayIfNeeded()
233 val userContext = getUser() in displayIfNeeded()
260 getUser: () -> Context, in handleModeChange()
273 session?.let { it.terminate(getUser, isBluetoothOn) } in handleModeChange()
316 fun terminate(getUser: () -> Context, isBluetoothOn: Boolean) { in terminate()
[all …]
/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/
DCarNotificationListenerTest.java102 when(mStatusBarNotification.getUser()).thenReturn(new UserHandle(CURRENT_USER_ID)); in setup()
115 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_notForCurrentUser_ignoresTheEvent()
127 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isNotHun_notForCurrentUser_ignoresTheEvent()
139 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_isForCurrentUser_addsAlertEntryToDataManager()
150 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_isForCurrentUser_doesNotAddItToActiveNotifications()
162 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_isForAllUsers_addsAlertEntryToDataManager()
173 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_isForAllUsers_doesNotAddItToActiveNotifications()
185 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isNotHun_isForCurrentUser_overrideGroupKeySet()
196 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isNotHun_isForCurrentUser_addsAlertEntryToDataManager()
207 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isNotHun_isForCurrentUser_addsItToActiveNotifications()
[all …]
DNotificationClickHandlerFactoryTest.java129 when(mStatusBarNotification1.getUser()).thenReturn(mUser1); in setUp()
130 when(mStatusBarNotification2.getUser()).thenReturn(mUser2); in setUp()
221 when(mStatusBarNotification1.getUser()).thenReturn(user); in onClickClickHandler_shouldAutoCancel_callsBarServiceOnNotificationClear()
229 mAlertEntry1.getStatusBarNotification().getUser().getIdentifier(), in onClickClickHandler_shouldAutoCancel_callsBarServiceOnNotificationClear()
388 .getStatusBarNotification().getUser().getIdentifier(), in onClickMuteClickHandler_mutePendingIntent_dismissesNotification()
537 mAlertEntry1.getStatusBarNotification().getUser().getIdentifier(), in onClearNotifications_groupNotificationWithSummary_clearsSummary()
567 mAlertEntry2.getStatusBarNotification().getUser().getIdentifier(), in onClearNotifications_groupNotificationWithSummary_clearsAllChildren()
596 mAlertEntry2.getStatusBarNotification().getUser().getIdentifier(), in onClearNotifications_groupNotificationWithoutSummary_clearsAllChildren()
/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/Settings/src/com/android/settings/applications/credentials/
DDefaultCombinedPreferenceController.java102 final int userId = getUser(); in updateState()
146 mContext, packageName, settingsActivity, getUser()); in updatePreferenceForProvider()
161 final int userId = getUser(); in getTopProvider()
211 protected int getUser() { in getUser() method in DefaultCombinedPreferenceController
218 mContext.createContextAsUser(UserHandle.of(getUser()), /* flags= */ 0); in createIntentToOpenPicker()
231 DefaultCombinedPicker.AUTOFILL_SETTING, null, getUser()); in removePrimaryProvider()
237 getUser(), in removePrimaryProvider()
DDefaultCombinedPicker.java96 getUser(); in onCreate()
222 getUser()); in newAddServicePreferenceOrNull()
232 context.startActivityAsUser(addNewServiceIntent, UserHandle.of(getUser())); in newAddServicePreferenceOrNull()
288 final int userId = getUser(); in getCandidates()
335 .getDeviceAdminRestrictions(getContext(), getUser())); in bindPreferenceExtra()
365 final int userId = getUser(); in getDefaultKey()
410 final List<CombinedProviderInfo> allProviders = getAllProviders(getUser()); in setDefaultKey()
477 getContext().getContentResolver(), AUTOFILL_SETTING, autofillProvider, getUser()); in setProviders()
489 getUser(), in setProviders()
507 getUser(), in setProviders()
[all …]
DCredentialManagerPreferenceController.java327 getUser(), in update()
355 getUser(), in updateFromExternal()
499 context.startActivityAsUser(addNewServiceIntent, UserHandle.of(getUser())); in newAddServicePreference()
524 getSelectedAutofillProvider(mContext, getUser(), TAG); in getProviders()
529 AutofillServiceInfo.getAvailableServices(mContext, getUser()), in getProviders()
567 Drawable icon = combinedInfo.getAppIcon(context, getUser()); in buildPreferenceList()
579 combinedInfo.getDeviceAdminRestrictions(context, getUser())); in buildPreferenceList()
772 mContext, packageName, settingsActivity, getUser()); in addProviderPreference()
800 getUser(), in commitEnabledPackages()
888 protected int getUser() { in getUser() method in CredentialManagerPreferenceController
[all …]
/packages/modules/Permission/framework-s/java/android/app/ecm/
DEnhancedConfirmationManager.java256 mContext.getUser().getIdentifier()); in isRestricted()
277 mService.clearRestriction(packageName, mContext.getUser().getIdentifier()); in clearRestriction()
302 mContext.getUser().getIdentifier()); in isClearRestrictionAllowed()
323 mService.setClearRestrictionAllowed(packageName, mContext.getUser().getIdentifier()); in setClearRestrictionAllowed()
354 mContext.getUser()).uid; in getPackageUid()
/packages/apps/Launcher3/src/com/android/launcher3/icons/
DComponentWithLabel.java31 UserHandle getUser(); in getUser() method
54 public UserHandle getUser(@NonNull T object) { in getUser() method in ComponentWithLabel.ComponentCachingLogic
55 return object.getUser(); in getUser()
DLauncherActivityCachingLogic.java53 public UserHandle getUser(@NonNull LauncherActivityInfo object) { in getUser() method in LauncherActivityCachingLogic
54 return object.getUser(); in getUser()
69 new IconOptions().setUser(object.getUser())); in loadIcon()
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/platform/
DFakeUserManagerTest.kt83 .containsExactly(state.getPrimaryUser(), state.getUser(work), state.getUser(private)) in <lambda>()
96 .containsExactly(state.getPrimaryUser(), state.getUser(clone)) in <lambda>()
113 val workUser = state.getUser(workHandle) in <lambda>()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/contactsindexer/
DContactsIndexerUserInstance.java176 Log.d(TAG, "Registering ContactsObserver for " + mContext.getUser()); in startAsync()
209 Log.d(TAG, "Unregistering ContactsObserver for " + mContext.getUser()); in shutdown()
214 mContext, mContext.getUser(), CONTACTS_INDEXER); in shutdown()
260 mContext, mContext.getUser(), CONTACTS_INDEXER)) { in doCp2SyncFirstRun()
265 mContext.getUser(), in doCp2SyncFirstRun()
299 mContext.getUser(), in doFullUpdateAsync()
575 mContext.getUser(), in doDeltaUpdateAsync() argument
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/users/
DRestrictedProfileModel.java61 final UserInfo restrictedUser = getUser(); in enterUser()
84 final UserInfo restrictedUser = getUser(); in removeUser()
102 public UserInfo getUser() { in getUser() method in RestrictedProfileModel
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/
DRestrictedProfileModel.java61 final UserInfo restrictedUser = getUser(); in enterUser()
84 final UserInfo restrictedUser = getUser(); in removeUser()
102 public UserInfo getUser() { in getUser() method in RestrictedProfileModel
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/exportimport/
DImportManagerTest.java130 mImportManager.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in copiesAllData()
179 mImportManager.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in skipsMissingTables()
203 mImportManager.runImport(mContext.getUser(), Uri.fromFile(dbToImport)); in deletesTheDatabase()
206 DatabaseContext.create(mContext, IMPORT_DATABASE_DIR_NAME, mContext.getUser()) in deletesTheDatabase()
220 mImportManager.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in runImport_importNotADatabase_setsWrongFileError()
241 mImportManager.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in runImport_versionMismatch_setsVersionMismatchError()
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DPermissionUpdateListenerTest.java114 mDefaultContext.getUser()); in testGrantPermissionInvokesOldCallback()
150 mDefaultContext.getUser()); in testGrantPermissionNotifyListener()
188 mDefaultContext.getUser()); in testRevokePermissionNotifyListener()
191 mDefaultContext.getUser()); in testRevokePermissionNotifyListener()
230 mDefaultContext.getUser()); in testUpdatePermissionFlagsNotifyListener()
/packages/apps/Car/Settings/src/com/android/car/settings/admin/
DNewUserDisclaimerActivity.java71 getCarDevicePolicyManager().setUserDisclaimerShown(getUser()); in onResume()
113 getCarDevicePolicyManager().setUserDisclaimerAcknowledged(getUser()); in onAccept()
132 LOG.d("getCarDevicePolicyManager for user: " + getUser()); in getCarDevicePolicyManager()
/packages/modules/HealthFitness/framework/java/android/health/connect/
DHealthConnectManager.java391 mService.grantHealthPermission(packageName, permissionName, mContext.getUser()); in grantHealthPermission()
417 packageName, permissionName, reason, mContext.getUser()); in revokeHealthPermission()
435 mService.revokeAllHealthPermissions(packageName, reason, mContext.getUser()); in revokeAllHealthPermissions()
451 return mService.getGrantedHealthPermissions(packageName, mContext.getUser()); in getGrantedHealthPermissions()
481 return mService.getHealthPermissionsFlags(packageName, mContext.getUser(), permissions); in getHealthPermissionsFlags()
504 packageName, mContext.getUser(), permissions, value); in setHealthPermissionsUserFixedFlagValue()
523 packageName, mContext.getUser()); in getHealthDataHistoricalAccessStartDate()
1126 return mService.getRecordRetentionPeriodInDays(mContext.getUser()); in getRecordRetentionPeriodInDays()
1160 mContext.getUser(), in setRecordRetentionPeriodInDays()
1402 mContext.getUser(), in stageAllHealthConnectRemoteData()
[all …]
/packages/modules/IntentResolver/tests/shared/src/com/android/intentresolver/platform/
DFakeUserManager.kt102 return state.getUser(userHandle).isQuietModeEnabled in <lambda>()
121 fun getPrimaryUser(): UserInfo = getUser(primaryUserHandle) in <lambda>()
154 fun getUser(handle: UserHandle): UserInfo = in <lambda>() method
172 val parentUser = getUser(parent) in <lambda>()
/packages/modules/AppSearch/framework/java/android/app/appsearch/
DAppSearchManager.java217 mContext.getUser(), in createSearchSession()
244 mContext.getUser(), in createGlobalSearchSession()
276 mContext.getUser(), in createEnterpriseGlobalSearchSession()
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/enterprise/
DManagedDeviceActionDisabledByAdminController.java97 packageManager, url, context.getUser(), mResolveActivityChecker); in canLaunchHelpPageInPreferredOrCurrentUser()
114 packageManager, url, context.getUser(), mResolveActivityChecker)) { in setupLearnMoreButtonToLaunchHelpPage()
115 mLauncher.setupLearnMoreButtonToLaunchHelpPage(context, url, context.getUser()); in setupLearnMoreButtonToLaunchHelpPage()
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/users/
DRestrictedProfileTest.java67 assertThat(newRpm().getUser()).isSameInstanceAs(mProfileInfo); in testGetUser_isSelf()
73 assertThat(newRpm().getUser()).isSameInstanceAs(mProfileInfo); in testGetUser_isChild()
79 assertThat(newRpm().getUser()).isNull(); in testGetUser_doesNotExist()
/packages/modules/AppSearch/testing/servicestests/src/com/android/server/appsearch/visibilitystore/
DVisibilityCheckerImplTest.java104 return createContextAsUser(getUser(), /*flags=*/ 0).getPackageManager(); in setUp()
121 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testDoesCallerHaveSystemAccess()
210 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testSetVisibility_visibleToPackages()
311 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testIsSchemaSearchableByCaller_packageAccessibilityHandlesNameNotFoundException()
350 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testEmptyPrefix()
435 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testSetSchema_visibleToPackages()
465 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testSetSchema_enterpriseNotVisibleToPackages()
868 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testPublicVisibility_mockPackageManager()
944 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testPublicVisibility_mockPackageManager_cantFindPackage()
/packages/apps/Launcher3/src/com/android/launcher3/pm/
DShortcutConfigActivityInfo.java73 public UserHandle getUser() { in getUser() method in ShortcutConfigActivityInfo
123 super(info.getComponentName(), info.getUser()); in ShortcutConfigActivityInfoVO()
139 if (getUser().equals(Process.myUserHandle())) { in startConfigActivity()

123456789