Home
last modified time | relevance | path

Searched refs:userContext (Results 1 – 25 of 29) sorted by relevance

12

/packages/providers/MediaProvider/src/com/android/providers/media/util/
DUserCache.java78 Context userContext = getContextForUser(profile); in update() local
79 if (userContext.getSystemService(UserManager.class).isMediaSharedWithParent()) { in update()
101 Context userContext; in getContextForUser() local
103 userContext = mUserContexts.get(user.getIdentifier()); in getContextForUser()
104 if (userContext != null) { in getContextForUser()
105 return userContext; in getContextForUser()
109 userContext = mContext.createPackageContextAsUser("system", 0, user); in getContextForUser()
111 mUserContexts.put(user.getIdentifier(), userContext); in getContextForUser() local
113 return userContext; in getContextForUser()
/packages/services/Telecomm/src/com/android/server/telecom/
DRingtoneFactory.java70 Context userContext = isWorkContact(incomingCall) ? in getRingtone() local
76 if(ringtoneUri != null && userContext != null) { in getRingtone()
79 ringtone = RingtoneManager.getRingtone(userContext, ringtoneUri, in getRingtone()
88 Context contextToUse = hasDefaultRingtoneForUser(userContext) ? userContext : mContext; in getRingtone()
154 private boolean hasDefaultRingtoneForUser(Context userContext) { in hasDefaultRingtoneForUser() argument
155 if(userContext == null) { in hasDefaultRingtoneForUser()
158 return !TextUtils.isEmpty(Settings.System.getStringForUser(userContext.getContentResolver(), in hasDefaultRingtoneForUser()
159 Settings.System.RINGTONE, userContext.getUserId())); in hasDefaultRingtoneForUser()
/packages/providers/MediaProvider/src/com/android/providers/media/
DVolumeCache.java115 final Context userContext = mUserCache.getContextForUser(user); in getVolumePath() local
116 return FileUtils.getVolumePath(userContext, volumeName); in getVolumePath()
137 final Context userContext = mUserCache.getContextForUser(user); in getVolumeScanPaths() local
138 final Collection<File> res = FileUtils.getVolumeScanPaths(userContext, volumeName); in getVolumeScanPaths()
171 private void updateExternalVolumesForUserLocked(Context userContext) { in updateExternalVolumesForUserLocked() argument
172 final StorageManager sm = userContext.getSystemService(StorageManager.class); in updateExternalVolumesForUserLocked()
173 for (String volumeName : MediaStore.getExternalVolumeNames(userContext)) { in updateExternalVolumesForUserLocked()
179 mCachedVolumeScanPaths.put(volume, FileUtils.getVolumeScanPaths(userContext, in updateExternalVolumesForUserLocked()
199 Context userContext = mUserCache.getContextForUser(user); in update() local
200 updateExternalVolumesForUserLocked(userContext); in update()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/model/
DReviewOngoingUsageViewModel.kt218 val userContext = Utils.getUserContext(PermissionControllerApplication.get(), user) in <lambda>() constant
222 userContext.getSystemService(InputMethodManager::class.java)!! in <lambda>()
227 it.serviceInfo.loadSafeLabel(userContext.packageManager, in <lambda>()
235 val recognitionPackageName = Settings.Secure.getString(userContext.contentResolver, in <lambda>()
241 val availableRecognizers = userContext.packageManager.queryIntentServices( in <lambda>()
246 recognizers[sI.packageName] = sI.loadSafeLabel(userContext.packageManager, in <lambda>()
252 val availableRecognizerIntents = userContext.packageManager.queryIntentActivities( in <lambda>()
261 rI.serviceInfo.loadSafeLabel(userContext.packageManager, in <lambda>()
269 setTrustedAttrsForAccess(userContext, opAccess, user, false, voiceInputs, in <lambda>()
271 setTrustedAttrsForAccess(userContext, opAccess, user, false, recognizerIntents, in <lambda>()
[all …]
DUnusedAppsViewModel.kt170 val userContext = Utils.getUserContext(app, user) in <lambda>() constant
175 userContext.startActivityAsUser(intent, user) in <lambda>()
190 val userContext = Utils.getUserContext(app, user) in <lambda>() constant
191 userContext.packageManager.setApplicationEnabledSetting(packageName, in <lambda>()
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DWifiPermissionsUtil.java111 Context userContext = createPackageContextAsUser(callingUid); in isTargetSdkLessThan() local
112 if (userContext == null) return false; in isTargetSdkLessThan()
113 targetSdkVersion = userContext.getPackageManager().getTargetSdkVersion(packageName); in isTargetSdkLessThan()
591 Context userContext = null; in createPackageContextAsUser() local
593 userContext = mContext.createPackageContextAsUser(mContext.getPackageName(), 0, in createPackageContextAsUser()
599 if (userContext == null) { in createPackageContextAsUser()
603 return userContext; in createPackageContextAsUser()
607 Context userContext = createPackageContextAsUser(uid); in retrieveDevicePolicyManagerFromUserContext() local
608 if (userContext == null) return null; in retrieveDevicePolicyManagerFromUserContext()
609 return retrieveDevicePolicyManagerFromContext(userContext); in retrieveDevicePolicyManagerFromUserContext()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/model/livedatatypes/
DLightPackageInfo.kt83 val userContext = Utils.getUserContext(app, UserHandle.getUserHandleForUid(uid)) in <lambda>() constant
84 return userContext.packageManager.getApplicationInfo(packageName, 0) in <lambda>()
101 val userContext = Utils.getUserContext(app, UserHandle.getUserHandleForUid(uid)) in <lambda>() constant
102 return userContext.packageManager.getPackageInfo(packageName, in <lambda>()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/
DAppPermGroupUiInfoLiveData.kt303 val userContext = Utils.getUserContext(app, user) in <lambda>() constant
304 if (LocationUtils.isLocationGroupAndProvider(userContext, permGroupName, packageName)) { in <lambda>()
305 return LocationUtils.isLocationEnabled(userContext) in <lambda>()
309 if (LocationUtils.isLocationGroupAndControllerExtraPackage(userContext, in <lambda>()
311 return LocationUtils.isExtraLocationControllerPackageEnabled(userContext) in <lambda>()
DLightAppPermGroupLiveData.kt119 val userContext = Utils.getUserContext(app, user) in <lambda>() constant
120 if (LocationUtils.isLocationGroupAndProvider(userContext, permGroupName, packageName)) { in <lambda>()
121 specialLocationGrant = LocationUtils.isLocationEnabled(userContext) in <lambda>()
127 userContext) in <lambda>()
DHibernatedPackagesLiveData.kt51 val userContext = getUserContext(PermissionControllerApplication.get(), user) in loadDataAndPostValue() constant
53 userContext.getSystemService(APP_HIBERNATION_SERVICE) as AppHibernationManager in loadDataAndPostValue()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/
DAdminRestrictedPermissionsUtils.java70 Context userContext = context.createContextAsUser(UserHandle.of(userId), /* flags= */0); in mayAdminGrantPermission() local
71 DevicePolicyManager dpm = userContext.getSystemService(DevicePolicyManager.class); in mayAdminGrantPermission()
72 UserManager um = userContext.getSystemService(UserManager.class); in mayAdminGrantPermission()
DKotlinUtils.kt306 val userContext = Utils.getUserContext(app, user) in <lambda>() constant
307 val appInfo = userContext.packageManager.getApplicationInfo(packageName, 0) in <lambda>()
325 val userContext = Utils.getUserContext(app, user) in <lambda>() constant
326 val appInfo = userContext.packageManager.getApplicationInfo(packageName, 0) in <lambda>()
347 val userContext = Utils.getUserContext(app, user) in <lambda>() constant
349 val appInfo = userContext.packageManager.getApplicationInfo(packageName, 0) in <lambda>()
367 val userContext = Utils.getUserContext(app, user) in <lambda>() constant
372 val appInfo = userContext.packageManager.getApplicationInfo(packageName, 0) in <lambda>()
DUserSensitiveFlagsUtils.kt61 val userContext = Utils.getUserContext(PermissionControllerApplication.get(), user) in updateUserSensitiveForUidsInternal() constant
62 val pm = userContext.packageManager in updateUserSensitiveForUidsInternal()
/packages/apps/Settings/src/com/android/settings/location/
DAppLocationPermissionPreferenceController.java90 final Context userContext = Utils.createPackageContextAsUser(mContext, in updateState() local
92 if (userContext == null) { in updateState()
101 userContext.getSystemService(PermissionControllerManager.class); in updateState()
DTopLevelLocationPreferenceController.java87 final Context userContext = Utils.createPackageContextAsUser(mContext, in updateState() local
89 if (userContext == null) { in updateState()
96 userContext.getSystemService(PermissionControllerManager.class); in updateState()
/packages/apps/Settings/src/com/android/settings/vpn2/
DAppPreference.java56 Context userContext = getUserContext(); in AppPreference() local
57 PackageManager pm = userContext.getPackageManager(); in AppPreference()
64 label = VpnConfig.getVpnLabel(userContext, mPackageName).toString(); in AppPreference()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/
DExemptRestrictedPermission.kt20 val userContext = context.createContextAsUser(UserHandle.of(userId), 0) in onReceive() constant
24 userContext.packageManager.addWhitelistedRestrictedPermission(packageName, permission, in onReceive()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/model/
DRequiredBroadcastReceiver.java47 Context userContext = UserUtils.getUserContext(context, user); in queryIntentComponentsAsUser() local
48 PackageManager userPackageManager = userContext.getPackageManager(); in queryIntentComponentsAsUser()
DRequiredContentProvider.java47 Context userContext = UserUtils.getUserContext(context, user); in queryIntentComponentsAsUser() local
48 PackageManager userPackageManager = userContext.getPackageManager(); in queryIntentComponentsAsUser()
DRequiredService.java47 Context userContext = UserUtils.getUserContext(context, user); in queryIntentComponentsAsUser() local
48 PackageManager userPackageManager = userContext.getPackageManager(); in queryIntentComponentsAsUser()
DRequiredActivity.java47 Context userContext = UserUtils.getUserContext(context, user); in queryIntentComponentsAsUser() local
48 PackageManager userPackageManager = userContext.getPackageManager(); in queryIntentComponentsAsUser()
DAssistantRoleBehavior.java112 Context userContext = UserUtils.getUserContext(context, user); in getQualifyingPackagesAsUser() local
113 ActivityManager userActivityManager = userContext.getSystemService(ActivityManager.class); in getQualifyingPackagesAsUser()
114 PackageManager userPackageManager = userContext.getPackageManager(); in getQualifyingPackagesAsUser()
DBrowserRoleBehavior.java106 Context userContext = UserUtils.getUserContext(context, user); in getQualifyingPackagesAsUserInternal() local
107 PackageManager userPackageManager = userContext.getPackageManager(); in getQualifyingPackagesAsUserInternal()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/hibernation/
DHibernationController.kt54 val userContext = context.createContextAsUser(user, 0 /* flags */) in hibernateApps() constant
56 userContext.getSystemService(APP_HIBERNATION_SERVICE) as AppHibernationManager in hibernateApps()
/packages/apps/Settings/src/com/android/settings/notification/zen/
DZenModeEventRuleSettings.java189 final Context userContext = getContextForUser(context, user); in getCalendars() local
190 if (userContext != null) { in getCalendars()
191 addCalendars(userContext, calendars); in getCalendars()

12