Lines Matching refs:userId

165     public void grantDefaultPermissions(int userId) {
166 grantPermissionsToSysComponentsAndPrivApps(userId);
167 grantDefaultSystemHandlerPermissions(userId);
170 private void grantPermissionsToSysComponentsAndPrivApps(int userId) {
171 Log.i(TAG, "Granting permissions to platform components for user " + userId);
190 grantRuntimePermissionsLPw(pkg, permissions, true, userId);
196 private void grantDefaultSystemHandlerPermissions(int userId) {
197 Log.i(TAG, "Granting permissions to default platform handlers for user " + userId);
216 ? voiceInteractionPackagesProvider.getPackages(userId) : null;
218 ? locationPackagesProvider.getPackages(userId) : null;
220 ? smsAppPackagesProvider.getPackages(userId) : null;
222 ? dialerAppPackagesProvider.getPackages(userId) : null;
224 ? simCallManagerPackagesProvider.getPackages(userId) : null;
226 syncAdapterPackagesProvider.getPackages(ContactsContract.AUTHORITY, userId) : null;
228 syncAdapterPackagesProvider.getPackages(CalendarContract.AUTHORITY, userId) : null;
236 grantRuntimePermissionsLPw(installerPackage, STORAGE_PERMISSIONS, true, userId);
244 grantRuntimePermissionsLPw(verifierPackage, STORAGE_PERMISSIONS, true, userId);
245 grantRuntimePermissionsLPw(verifierPackage, PHONE_PERMISSIONS, false, userId);
246 grantRuntimePermissionsLPw(verifierPackage, SMS_PERMISSIONS, false, userId);
254 grantRuntimePermissionsLPw(setupPackage, PHONE_PERMISSIONS, userId);
255 grantRuntimePermissionsLPw(setupPackage, CONTACTS_PERMISSIONS, userId);
256 grantRuntimePermissionsLPw(setupPackage, LOCATION_PERMISSIONS, userId);
257 grantRuntimePermissionsLPw(setupPackage, CAMERA_PERMISSIONS, userId);
263 cameraIntent, userId);
266 grantRuntimePermissionsLPw(cameraPackage, CAMERA_PERMISSIONS, userId);
267 grantRuntimePermissionsLPw(cameraPackage, MICROPHONE_PERMISSIONS, userId);
268 grantRuntimePermissionsLPw(cameraPackage, STORAGE_PERMISSIONS, userId);
273 MediaStore.AUTHORITY, userId);
275 grantRuntimePermissionsLPw(mediaStorePackage, STORAGE_PERMISSIONS, true, userId);
280 "downloads", userId);
282 grantRuntimePermissionsLPw(downloadsPackage, STORAGE_PERMISSIONS, true, userId);
288 downloadsUiIntent, userId);
291 grantRuntimePermissionsLPw(downloadsUiPackage, STORAGE_PERMISSIONS, true, userId);
296 "com.android.externalstorage.documents", userId);
298 grantRuntimePermissionsLPw(storagePackage, STORAGE_PERMISSIONS, true, userId);
304 certInstallerIntent, userId);
307 grantRuntimePermissionsLPw(certInstallerPackage, STORAGE_PERMISSIONS, true, userId);
314 dialerIntent, userId);
316 grantDefaultPermissionsToDefaultSystemDialerAppLPr(dialerPackage, userId);
322 grantDefaultPermissionsToDefaultSystemDialerAppLPr(dialerPackage, userId);
334 userId);
344 smsIntent, userId);
346 grantDefaultPermissionsToDefaultSystemSmsAppLPr(smsPackage, userId);
352 grantDefaultPermissionsToDefaultSystemSmsAppLPr(smsPackage, userId);
360 getDefaultSystemHandlerActivityPackageLPr(cbrIntent, userId);
362 grantRuntimePermissionsLPw(cbrPackage, SMS_PERMISSIONS, userId);
368 getDefaultSystemHandlerServicePackageLPr(carrierProvIntent, userId);
370 grantRuntimePermissionsLPw(carrierProvPackage, SMS_PERMISSIONS, false, userId);
377 calendarIntent, userId);
380 grantRuntimePermissionsLPw(calendarPackage, CALENDAR_PERMISSIONS, userId);
381 grantRuntimePermissionsLPw(calendarPackage, CONTACTS_PERMISSIONS, userId);
386 CalendarContract.AUTHORITY, userId);
388 grantRuntimePermissionsLPw(calendarProviderPackage, CONTACTS_PERMISSIONS, userId);
390 true, userId);
391 grantRuntimePermissionsLPw(calendarProviderPackage, STORAGE_PERMISSIONS, userId);
396 calendarSyncAdapterPackages, userId);
401 grantRuntimePermissionsLPw(calendarSyncAdapter, CALENDAR_PERMISSIONS, userId);
409 contactsIntent, userId);
412 grantRuntimePermissionsLPw(contactsPackage, CONTACTS_PERMISSIONS, userId);
413 grantRuntimePermissionsLPw(contactsPackage, PHONE_PERMISSIONS, userId);
418 contactsSyncAdapterPackages, userId);
423 grantRuntimePermissionsLPw(contactsSyncAdapter, CONTACTS_PERMISSIONS, userId);
429 ContactsContract.AUTHORITY, userId);
432 true, userId);
434 true, userId);
435 grantRuntimePermissionsLPw(contactsProviderPackage, STORAGE_PERMISSIONS, userId);
442 getDefaultSystemHandlerActivityPackageLPr(deviceProvisionIntent, userId);
445 grantRuntimePermissionsLPw(deviceProvisionPackage, CONTACTS_PERMISSIONS, userId);
452 mapsIntent, userId);
455 grantRuntimePermissionsLPw(mapsPackage, LOCATION_PERMISSIONS, userId);
462 galleryIntent, userId);
465 grantRuntimePermissionsLPw(galleryPackage, STORAGE_PERMISSIONS, userId);
472 emailIntent, userId);
475 grantRuntimePermissionsLPw(emailPackage, CONTACTS_PERMISSIONS, userId);
480 String defaultBrowserPackage = mService.getDefaultBrowserPackageName(userId);
488 browserIntent, userId);
492 grantRuntimePermissionsLPw(browserPackage, LOCATION_PERMISSIONS, userId);
503 CONTACTS_PERMISSIONS, userId);
505 CALENDAR_PERMISSIONS, userId);
507 MICROPHONE_PERMISSIONS, userId);
509 PHONE_PERMISSIONS, userId);
511 SMS_PERMISSIONS, userId);
513 LOCATION_PERMISSIONS, userId);
522 voiceRecoIntent, userId);
525 grantRuntimePermissionsLPw(voiceRecoPackage, MICROPHONE_PERMISSIONS, userId);
534 grantRuntimePermissionsLPw(locationPackage, CONTACTS_PERMISSIONS, userId);
535 grantRuntimePermissionsLPw(locationPackage, CALENDAR_PERMISSIONS, userId);
536 grantRuntimePermissionsLPw(locationPackage, MICROPHONE_PERMISSIONS, userId);
537 grantRuntimePermissionsLPw(locationPackage, PHONE_PERMISSIONS, userId);
538 grantRuntimePermissionsLPw(locationPackage, SMS_PERMISSIONS, userId);
540 true, userId);
541 grantRuntimePermissionsLPw(locationPackage, CAMERA_PERMISSIONS, userId);
542 grantRuntimePermissionsLPw(locationPackage, SENSORS_PERMISSIONS, userId);
543 grantRuntimePermissionsLPw(locationPackage, STORAGE_PERMISSIONS, userId);
554 musicIntent, userId);
557 grantRuntimePermissionsLPw(musicPackage, STORAGE_PERMISSIONS, userId);
566 homeIntent, userId);
571 userId);
572 grantRuntimePermissionsLPw(wearHomePackage, PHONE_PERMISSIONS, true, userId);
574 userId);
576 userId);
585 grantRuntimePermissionsLPw(printSpoolerPackage, LOCATION_PERMISSIONS, true, userId);
591 emergencyInfoIntent, userId);
594 grantRuntimePermissionsLPw(emergencyInfoPckg, CONTACTS_PERMISSIONS, true, userId);
595 grantRuntimePermissionsLPw(emergencyInfoPckg, PHONE_PERMISSIONS, true, userId);
602 nfcTagIntent, userId);
605 grantRuntimePermissionsLPw(nfcTagPkg, CONTACTS_PERMISSIONS, false, userId);
606 grantRuntimePermissionsLPw(nfcTagPkg, PHONE_PERMISSIONS, false, userId);
608 mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId);
613 PackageParser.Package dialerPackage, int userId) {
618 dialerPackage, PHONE_PERMISSIONS, isPhonePermFixed, userId);
619 grantRuntimePermissionsLPw(dialerPackage, CONTACTS_PERMISSIONS, userId);
620 grantRuntimePermissionsLPw(dialerPackage, SMS_PERMISSIONS, userId);
621 grantRuntimePermissionsLPw(dialerPackage, MICROPHONE_PERMISSIONS, userId);
626 PackageParser.Package smsPackage, int userId) {
628 grantRuntimePermissionsLPw(smsPackage, PHONE_PERMISSIONS, userId);
629 grantRuntimePermissionsLPw(smsPackage, CONTACTS_PERMISSIONS, userId);
630 grantRuntimePermissionsLPw(smsPackage, SMS_PERMISSIONS, userId);
634 public void grantDefaultPermissionsToDefaultSmsAppLPr(String packageName, int userId) {
635 Log.i(TAG, "Granting permissions to default sms app for user:" + userId);
641 grantRuntimePermissionsLPw(smsPackage, PHONE_PERMISSIONS, false, true, userId);
642 grantRuntimePermissionsLPw(smsPackage, CONTACTS_PERMISSIONS, false, true, userId);
643 grantRuntimePermissionsLPw(smsPackage, SMS_PERMISSIONS, false, true, userId);
647 public void grantDefaultPermissionsToDefaultDialerAppLPr(String packageName, int userId) {
648 Log.i(TAG, "Granting permissions to default dialer app for user:" + userId);
655 grantRuntimePermissionsLPw(dialerPackage, PHONE_PERMISSIONS, false, true, userId);
656 grantRuntimePermissionsLPw(dialerPackage, CONTACTS_PERMISSIONS, false, true, userId);
657 grantRuntimePermissionsLPw(dialerPackage, SMS_PERMISSIONS, false, true, userId);
658 grantRuntimePermissionsLPw(dialerPackage, MICROPHONE_PERMISSIONS, false, true, userId);
663 PackageParser.Package simCallManagerPackage, int userId) {
664 Log.i(TAG, "Granting permissions to sim call manager for user:" + userId);
666 grantRuntimePermissionsLPw(simCallManagerPackage, PHONE_PERMISSIONS, userId);
667 grantRuntimePermissionsLPw(simCallManagerPackage, MICROPHONE_PERMISSIONS, userId);
671 public void grantDefaultPermissionsToDefaultSimCallManagerLPr(String packageName, int userId) {
677 grantDefaultPermissionsToDefaultSimCallManagerLPr(simCallManagerPackage, userId);
681 public void grantDefaultPermissionsToEnabledCarrierAppsLPr(String[] packageNames, int userId) {
682 Log.i(TAG, "Granting permissions to enabled carrier apps for user:" + userId);
690 grantRuntimePermissionsLPw(carrierPackage, PHONE_PERMISSIONS, userId);
691 grantRuntimePermissionsLPw(carrierPackage, LOCATION_PERMISSIONS, userId);
692 grantRuntimePermissionsLPw(carrierPackage, SMS_PERMISSIONS, userId);
697 public void grantDefaultPermissionsToDefaultBrowserLPr(String packageName, int userId) {
698 Log.i(TAG, "Granting permissions to default browser for user:" + userId);
705 grantRuntimePermissionsLPw(browserPackage, LOCATION_PERMISSIONS, false, false, userId);
710 Intent intent, int userId) {
712 intent.resolveType(mService.mContext.getContentResolver()), DEFAULT_FLAGS, userId);
725 Intent intent, int userId) {
727 intent.resolveType(mService.mContext.getContentResolver()), DEFAULT_FLAGS, userId)
745 String[] syncAdapterPackageNames, int userId) {
756 userId);
771 String authority, int userId) {
772 ProviderInfo provider = mService.resolveContentProvider(authority, DEFAULT_FLAGS, userId);
792 int userId) {
793 grantRuntimePermissionsLPw(pkg, permissions, false, false, userId);
797 boolean systemFixed, int userId) {
798 grantRuntimePermissionsLPw(pkg, permissions, systemFixed, false, userId);
802 boolean systemFixed, boolean isDefaultPhoneOrSms, int userId) {
840 final int flags = mService.getPermissionFlags(permission, pkg.packageName, userId);
856 mService.grantRuntimePermission(pkg.packageName, permission, userId);
868 newFlags, newFlags, userId);
881 PackageManager.FLAG_PERMISSION_SYSTEM_FIXED, 0, userId);