Home
last modified time | relevance | path

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

1234567891011

/packages/modules/Bluetooth/service/src/airplane/
DModeListener.kt173 getUser: () -> Context, in airplaneModeValueOverride()
181 if (isApmEnhancementEnabled(resolver) && hasUserToggledApm(getUser())) { in airplaneModeValueOverride()
183 if (isBluetoothOnAPM(getUser)) { in airplaneModeValueOverride()
184 val isWifiOn = isWifiOnApm(resolver, getUser) in airplaneModeValueOverride()
204 ToastNotification.displayIfNeeded(resolver, getUser) in airplaneModeValueOverride()
225 fun displayIfNeeded(resolver: ContentResolver, getUser: () -> Context) { in displayIfNeeded()
230 val userContext = getUser() in displayIfNeeded()
257 getUser: () -> Context, in handleModeChange()
270 session?.let { it.terminate(getUser, isBluetoothOn) } in handleModeChange()
313 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 …]
/packages/modules/Nfc/framework/java/android/nfc/cardemulation/
DNfcFCardEmulation.java113 return sService.getSystemCodeForService(mContext.getUser().getIdentifier(), service); in getSystemCodeForService()
122 return sService.getSystemCodeForService(mContext.getUser().getIdentifier(), in getSystemCodeForService()
160 return sService.registerSystemCodeForService(mContext.getUser().getIdentifier(), in registerSystemCodeForService()
170 return sService.registerSystemCodeForService(mContext.getUser().getIdentifier(), in registerSystemCodeForService()
191 return sService.removeSystemCodeForService(mContext.getUser().getIdentifier(), service); in unregisterSystemCodeForService()
200 return sService.removeSystemCodeForService(mContext.getUser().getIdentifier(), in unregisterSystemCodeForService()
227 return sService.getNfcid2ForService(mContext.getUser().getIdentifier(), service); in getNfcid2ForService()
236 return sService.getNfcid2ForService(mContext.getUser().getIdentifier(), service); in getNfcid2ForService()
270 return sService.setNfcid2ForService(mContext.getUser().getIdentifier(), in setNfcid2ForService()
280 return sService.setNfcid2ForService(mContext.getUser().getIdentifier(), in setNfcid2ForService()
[all …]
DCardEmulation.java351 mContext.getUser().getIdentifier(), service, category), false); in isDefaultServiceForCategory()
368 mContext.getUser().getIdentifier(), service, aid), false); in isDefaultServiceForAid()
456 mContext.getUser().getIdentifier(), service, enable), false); in setShouldDefaultToObserveModeForService()
479 mContext.getUser().getIdentifier(), service, pollingLoopFilterV, autoTransact), in registerPollingLoopFilterForService()
497 mContext.getUser().getIdentifier(), service, pollingLoopFilterV), false); in removePollingLoopFilterForService()
528 mContext.getUser().getIdentifier(), service, pollingLoopPatternFilterV, in registerPollingLoopPatternFilterForService()
553 mContext.getUser().getIdentifier(), service, pollingLoopPatternFilterV), false); in removePollingLoopPatternFilterForService()
581 mContext.getUser().getIdentifier(), service, aidGroup), false); in registerAidsForService()
605 mContext.getUser().getIdentifier(), service), false); in unsetOffHostForService()
667 mContext.getUser().getIdentifier(), service, offHostSecureElementV), false); in setOffHostForService()
[all …]
/packages/modules/Nfc/framework/tests/src/android/nfc/cardemulation/
DCardemulationTest.java101 when(mContext.getUser()).thenReturn(userHandle); in testIsDefaultServiceForCategory()
117 when(mContext.getUser()).thenReturn(userHandle); in testIsDefaultServiceForAid()
152 when(mContext.getUser()).thenReturn(userHandle); in testSetShouldDefaultToObserveModeForService()
166 when(mContext.getUser()).thenReturn(userHandle); in testRegisterPollingLoopFilterForService()
181 when(mContext.getUser()).thenReturn(userHandle); in testRemovePollingLoopFilterForService()
195 when(mContext.getUser()).thenReturn(userHandle); in testRegisterPollingLoopPatternFilterForService()
210 when(mContext.getUser()).thenReturn(userHandle); in testRemovePollingLoopPatternFilterForService()
225 when(mContext.getUser()).thenReturn(userHandle); in testRegisterAidsForService()
242 when(mContext.getUser()).thenReturn(userHandle); in testUnsetOffHostForService()
254 when(mContext.getUser()).thenReturn(userHandle); in testSetOffHostForService()
[all …]
DNfcFCardEmulationTest.java167 when(mContext.getUser()).thenReturn(mockUserHandles); in testGetSystemCodeForServiceWithRecoveryFail()
271 when(mContext.getUser()).thenReturn(mockUserHandles); in testGetNfcFServicesSuccess()
283 when(mContext.getUser()).thenReturn(mockUserHandles); in testGetNfcFServiceWithNullServices()
297 when(mContext.getUser()).thenReturn(mockUserHandles); in testGetNfcFServiceWithSecondTry()
312 when(mContext.getUser()).thenReturn(mockUserHandles); in testGetNfcFServiceWithSecondTryFailure()
464 when(mContext.getUser()).thenReturn(mockUserHandle); in testSetNfcid2ForServiceSuccess()
486 when(mContext.getUser()).thenReturn(mockUserHandle); in testSetNfcid2ForServiceWithException()
502 when(mContext.getUser()).thenReturn(mockUserHandle); in testSetNfcid2ForServiceWithSecondTry()
519 when(mContext.getUser()).thenReturn(mockUserHandle); in testSetNfcid2ForServiceWithSecondTryFail()
536 when(mContext.getUser()).thenReturn(mockUserHandle); in testGetNfcid2ForServiceSuccess()
[all …]
/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/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/exportimport/
DExportManagerTest.java150 mContext.getUser(), in setUp()
201 assertThat(mExportManager.runExport(mContext.getUser())).isTrue(); in testWhenPhrExportImportEnableFlagIsEnabled_tableContentIsExported()
235 assertThat(mExportManager.runExport(mContext.getUser())).isTrue(); in testWhenBothPhrExportImportEnableFlagAndDisableFlagAreDisabled_tableContentIsExported()
270 assertThat(mExportManager.runExport(mContext.getUser())).isTrue(); in testPhrExportImportEnableFlagIsDisableAndDisableFlagIsEnabled_deletesPhrTablesContent()
288 assertThat(mExportManager.runExport(mContext.getUser())).isTrue(); in deletesAccessLogsTableContent()
327 assertThat(mExportManager.runExport(mContext.getUser())).isTrue(); in deletesChangeLogsTableContent()
341 assertThat(mExportManager.runExport(mContext.getUser())).isTrue(); in runExport_whenCompleted_deletesLocalCopies()
346 mContext.getUser(), in runExport_whenCompleted_deletesLocalCopies()
358 assertThat(mExportManager.runExport(mContext.getUser())).isFalse(); in runExport_localExportFails_logsWithGenericError()
376 boolean success = mExportManager.runExport(mContext.getUser()); in runExport_noCompressedFile_logsWithGenericError()
[all …]
DImportManagerTest.java218 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in copiesAllData()
265 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in mergesPriorityList()
303 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in mergesPriorityList_handlesDifferentPackageNames()
346 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in skipsMissingTables()
375 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(dbToImport)); in deletesTheDatabase()
390 mContext.getUser(), in deletesTheDatabase()
404 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in importNotADatabase_logsWrongFileError()
423 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in importNotADatabase_setsWrongFileError()
449 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in importWrongFileName_setsWrongFileError()
479 mImportManagerSpy.runImport(mContext.getUser(), Uri.fromFile(zipToImport)); in importWrongFileName_logsWrongFileError()
[all …]
/packages/apps/Settings/src/com/android/settings/applications/credentials/
DDefaultCombinedPreferenceController.java106 final int userId = getUser(); in updateState()
150 mContext, packageName, settingsActivity, getUser()); in updatePreferenceForProvider()
165 final int userId = getUser(); in getTopProvider()
215 protected int getUser() { in getUser() method in DefaultCombinedPreferenceController
216 return UserUtils.getUser(mIsWorkProfile, mIsPrivateSpace, mContext); in getUser()
222 mContext.createContextAsUser(UserHandle.of(getUser()), /* flags= */ 0); in createIntentToOpenPicker()
238 DefaultCombinedPicker.AUTOFILL_SETTING, null, getUser()); in removePrimaryProvider()
244 getUser(), in removePrimaryProvider()
DDefaultCombinedPicker.java102 getUser(); in onCreate()
228 getUser()); in newAddServicePreferenceOrNull()
238 context.startActivityAsUser(addNewServiceIntent, UserHandle.of(getUser())); in newAddServicePreferenceOrNull()
294 final int userId = getUser(); in getCandidates()
341 .getDeviceAdminRestrictions(getContext(), getUser())); in bindPreferenceExtra()
371 final int userId = getUser(); in getDefaultKey()
416 final List<CombinedProviderInfo> allProviders = getAllProviders(getUser()); in setDefaultKey()
483 getContext().getContentResolver(), AUTOFILL_SETTING, autofillProvider, getUser()); in setProviders()
495 getUser(), in setProviders()
513 getUser(), in setProviders()
[all …]
DCredentialManagerPreferenceController.java330 getUser(), in update()
358 getUser(), in updateFromExternal()
503 UserHandle.of(getUser())); in newAddServicePreference()
528 getSelectedAutofillProvider(mContext, getUser(), TAG); in getProviders()
533 AutofillServiceInfo.getAvailableServices(mContext, getUser()), in getProviders()
571 Drawable icon = combinedInfo.getAppIcon(context, getUser()); in buildPreferenceList()
583 combinedInfo.getDeviceAdminRestrictions(context, getUser())); in buildPreferenceList()
776 mContext, packageName, settingsActivity, getUser()); in addProviderPreference()
804 getUser(), in commitEnabledPackages()
892 protected int getUser() { in getUser() method in CredentialManagerPreferenceController
[all …]
/packages/modules/Permission/framework-s/java/android/app/ecm/
DEnhancedConfirmationManager.java272 mContext.getUser().getIdentifier()); in isRestricted()
293 mService.clearRestriction(packageName, mContext.getUser().getIdentifier()); in clearRestriction()
318 mContext.getUser().getIdentifier()); in isClearRestrictionAllowed()
342 mService.setClearRestrictionAllowed(packageName, mContext.getUser().getIdentifier()); in setClearRestrictionAllowed()
382 mContext.getUser()).uid; in getPackageUid()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/contactsindexer/
DContactsIndexerUserInstance.java181 Log.d(TAG, "Registering ContactsObserver for " + mContext.getUser()); in startAsync()
214 Log.d(TAG, "Unregistering ContactsObserver for " + mContext.getUser()); in shutdown()
219 mContext, mContext.getUser(), CONTACTS_INDEXER); in shutdown()
273 mContext.getUser(), in doCp2SyncFirstRun()
280 && IndexerMaintenanceService.isUpdateJobScheduled(mContext, mContext.getUser(), in doCp2SyncFirstRun()
287 mContext.getUser(), in doCp2SyncFirstRun()
321 mContext.getUser(), in doFullUpdateAsync()
599 mContext.getUser(), in doDeltaUpdateAsync() argument
740 mContext.getUser(),
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/backuprestore/
DBackupRestoreWithoutMocksTest.java161 mContext.getUser(), in testGetAllDataForBackup_disableD2dFlagEnabled_copiesAllDataExceptPhr()
169 when(mFirstGrantTimeManager.getGrantTimeStateForUser(mContext.getUser())) in testGetAllDataForBackup_disableD2dFlagEnabled_copiesAllDataExceptPhr()
182 new StageRemoteDataRequest(pfdsByFileName), mContext.getUser()); in testGetAllDataForBackup_disableD2dFlagEnabled_copiesAllDataExceptPhr()
215 mContext.getUser(), in testGetAllDataForBackup_disableD2dFlagDisabled_copiesAllDataIncludingPhr()
223 when(mFirstGrantTimeManager.getGrantTimeStateForUser(mContext.getUser())) in testGetAllDataForBackup_disableD2dFlagDisabled_copiesAllDataIncludingPhr()
236 new StageRemoteDataRequest(pfdsByFileName), mContext.getUser()); in testGetAllDataForBackup_disableD2dFlagDisabled_copiesAllDataIncludingPhr()
260 mContext.getUser(), in testMerge_withPhrMergeEnabled_over5000Resources_copiesAllPhrData()
318 mContext.getUser(), in testMerge_withPhrMergeEnabled_copiesAllPhrData()
392 mContext.getUser(), in testMerge_withPhrMergeEnabled_doesNotCopyMedicalDataSourceDuplicates()
457 mContext.getUser(), in testMerge_withPhrMergeEnabled_doesNotCopyMedicalResourceDuplicates()
[all …]
/packages/modules/Nfc/tests/cts/tests/src/android/nfc/cts/
DWalletRoleTestUtils.java121 context.getUser(), MoreExecutors.directExecutor(), aBoolean -> { in removeRoleHolder()
170 onRoleHoldersChangedListener, context.getUser()); in runWithRole()
180 context.getUser()); in runWithRole()
228 onRoleHoldersChangedListener, context.getUser()); in runWithRoleNone()
240 context.getUser()); in runWithRoleNone()
258 context.getUser(), MoreExecutors.directExecutor(), aBoolean -> { in clearRoleHolders()
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DPermissionUpdateListenerTest.java102 mDefaultContext.getUser()); in testGrantPermissionInvokesOldCallback()
131 mDefaultContext.getUser()); in testGrantPermissionNotifyListener()
162 mDefaultContext.getUser()); in testRevokePermissionNotifyListener()
165 mDefaultContext.getUser()); in testRevokePermissionNotifyListener()
198 mDefaultContext.getUser()); in testUpdatePermissionFlagsNotifyListener()
/packages/modules/Permission/framework-s/java/android/app/role/
DRoleManager.java559 roleName, mContext.getUser().getIdentifier()); in getDefaultApplication()
595 mContext.getUser().getIdentifier(), createRemoteCallback(executor, callback)); in setDefaultApplication()
633 mContext.getUser().getIdentifier()); in getActiveUserForRole()
676 mContext.getUser().getIdentifier()); in setActiveUserForRole()
851 mContext.getUser().getIdentifier()); in isRoleFallbackEnabled()
873 mContext.getUser().getIdentifier()); in setRoleFallbackEnabled()
1012 return CompatChanges.isChangeEnabled(ROLE_MANAGER_USER_HANDLE_AWARE) ? mContext.getUser() in getContextUserIfAppropriate()
1206 mContext.getUser().getIdentifier()); in getDefaultHoldersForTest()
1238 mContext.getUser().getIdentifier()); in setDefaultHoldersForTest()
1266 mContext.getUser().getIdentifier()); in isRoleVisibleForTest()
[all …]
/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/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/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/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/AppSearch/framework/java/android/app/appsearch/
DAppSearchManager.java214 mContext.getUser(), in createSearchSession()
241 mContext.getUser(), in createGlobalSearchSession()
273 mContext.getUser(), in createEnterpriseGlobalSearchSession()
/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>()

1234567891011