/packages/apps/PermissionController/src/com/android/packageinstaller/permission/model/ |
D | AppPermissionGroup.java | 17 package com.android.packageinstaller.permission.model; 19 import static android.Manifest.permission.ACCESS_BACKGROUND_LOCATION; 20 import static android.Manifest.permission.ACCESS_FINE_LOCATION; 38 import android.permission.PermissionManager; 47 import com.android.packageinstaller.permission.service.LocationAccessCheck; 48 import com.android.packageinstaller.permission.utils.ArrayUtils; 49 import com.android.packageinstaller.permission.utils.LocationUtils; 50 import com.android.packageinstaller.permission.utils.SoftRestrictedPermissionPolicy; 51 import com.android.packageinstaller.permission.utils.Utils; 288 Permission permission = new Permission(requestedPermission, requestedPermissionInfo, in create() local [all …]
|
D | AppPermissionUsage.java | 17 package com.android.packageinstaller.permission.model; 28 import com.android.packageinstaller.permission.model.PermissionApps.PermissionApp; 79 final GroupUsage permission = mGroupUsages.get(i); in getAccessCount() local 80 accessCount += permission.getAccessCount(); in getAccessCount() 172 final Permission permission = permissions.get(i); in isRunning() local 173 final String opName = permission.getAppOp(); in isRunning() 191 final Permission permission = permissions.get(i); in extractAggregate() local 192 final String opName = permission.getAppOp(); in extractAggregate() 206 final Permission permission = permissions.get(permissionNum); in lastAccessAggregate() local 207 final String opName = permission.getAppOp(); in lastAccessAggregate()
|
/packages/apps/PermissionController/src/com/android/packageinstaller/role/model/ |
D | Permissions.java | 30 import android.permission.PermissionManager; 38 import com.android.packageinstaller.permission.utils.ArrayUtils; 39 import com.android.packageinstaller.permission.utils.CollectionUtils; 40 import com.android.packageinstaller.permission.utils.Utils; 144 String permission = permissionsToGrant.valueAt(i); in grant() local 146 if (isForegroundPermission(permission, context)) { in grant() 147 sortedPermissionsToGrant[foregroundPermissionCount] = permission; in grant() 151 sortedPermissionsToGrant[index] = permission; in grant() 169 String permission = sortedPermissionsToGrant[i]; in grant() local 171 if ((smsPermissions.contains(permission) || callLogPermissions.contains(permission)) in grant() [all …]
|
D | Roles.java | 247 String permission = requireAttributeValue(parser, ATTRIBUTE_NAME, TAG_PERMISSION); in parsePermissionSet() local 248 if (permission == null) { in parsePermissionSet() 251 checkDuplicateElement(permission, permissions, "permission"); in parsePermissionSet() 252 permissions.add(permission); in parsePermissionSet() 459 String permission = getAttributeValue(parser, ATTRIBUTE_PERMISSION); in parseRequiredComponent() local 524 return new RequiredActivity(intentFilterData, permission, metaData); in parseRequiredComponent() 526 return new RequiredContentProvider(intentFilterData, permission, metaData); in parseRequiredComponent() 528 return new RequiredBroadcastReceiver(intentFilterData, permission, metaData); in parseRequiredComponent() 530 return new RequiredService(intentFilterData, permission, metaData); in parseRequiredComponent() 653 String permission = requireAttributeValue(parser, ATTRIBUTE_NAME, in parsePermissions() local [all …]
|
/packages/apps/Dialer/java/com/android/dialer/util/ |
D | PermissionsUtil.java | 19 import static android.Manifest.permission.ACCESS_COARSE_LOCATION; 20 import static android.Manifest.permission.ACCESS_FINE_LOCATION; 21 import static android.Manifest.permission.ADD_VOICEMAIL; 22 import static android.Manifest.permission.CALL_PHONE; 23 import static android.Manifest.permission.MODIFY_PHONE_STATE; 24 import static android.Manifest.permission.READ_CALL_LOG; 25 import static android.Manifest.permission.READ_CONTACTS; 26 import static android.Manifest.permission.READ_PHONE_STATE; 27 import static android.Manifest.permission.READ_VOICEMAIL; 28 import static android.Manifest.permission.SEND_SMS; [all …]
|
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/utils/ |
D | Utils.java | 17 package com.android.packageinstaller.permission.utils; 19 import static android.Manifest.permission.RECORD_AUDIO; 85 import com.android.packageinstaller.permission.data.PerUserUidToSensitivityLiveData; 86 import com.android.packageinstaller.permission.model.AppPermissionGroup; 130 PLATFORM_PERMISSIONS.put(Manifest.permission.READ_CONTACTS, CONTACTS); in PLATFORM_PERMISSIONS.put() 131 PLATFORM_PERMISSIONS.put(Manifest.permission.WRITE_CONTACTS, CONTACTS); in PLATFORM_PERMISSIONS.put() 132 PLATFORM_PERMISSIONS.put(Manifest.permission.GET_ACCOUNTS, CONTACTS); in PLATFORM_PERMISSIONS.put() 134 PLATFORM_PERMISSIONS.put(Manifest.permission.READ_CALENDAR, CALENDAR); in PLATFORM_PERMISSIONS.put() 135 PLATFORM_PERMISSIONS.put(Manifest.permission.WRITE_CALENDAR, CALENDAR); in PLATFORM_PERMISSIONS.put() 137 PLATFORM_PERMISSIONS.put(Manifest.permission.SEND_SMS, SMS); in PLATFORM_PERMISSIONS.put() [all …]
|
D | SoftRestrictedPermissionPolicy.java | 17 package com.android.packageinstaller.permission.utils; 19 import static android.Manifest.permission.READ_EXTERNAL_STORAGE; 20 import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE; 30 import com.android.packageinstaller.permission.model.Permission; 52 public static boolean shouldShow(@NonNull PackageInfo pkg, @NonNull Permission permission) { in shouldShow() argument 53 switch (permission.getName()) { in shouldShow() 57 (permission.getFlags() & FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT) != 0; in shouldShow()
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | OsUtil.java | 194 public static boolean hasPermission(final String permission) { in hasPermission() argument 199 if (!sPermissions.containsKey(permission) in hasPermission() 200 || sPermissions.get(permission) == PackageManager.PERMISSION_DENIED) { in hasPermission() 202 final int permissionState = context.checkSelfPermission(permission); in hasPermission() 203 sPermissions.put(permission, permissionState); in hasPermission() 205 return sPermissions.get(permission) == PackageManager.PERMISSION_GRANTED; in hasPermission() 213 for (final String permission : permissions) { in hasPermissions() 214 if (!hasPermission(permission)) { in hasPermissions() 222 return hasPermission(Manifest.permission.READ_PHONE_STATE); in hasPhonePermission() 226 return hasPermission(Manifest.permission.READ_SMS); in hasSmsPermission() [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | VoicemailPermissions.java | 41 return callerHasPermission(android.Manifest.permission.ADD_VOICEMAIL) in callerHasOwnVoicemailAccess() 61 return callerHasPermission(android.Manifest.permission.READ_VOICEMAIL); in callerHasReadAccess() 70 return callerHasPermission(android.Manifest.permission.WRITE_VOICEMAIL); in callerHasWriteAccess() 81 android.Manifest.permission.ADD_VOICEMAIL + " or carrier privileges"); in checkCallerHasOwnVoicemailAccess() 94 android.Manifest.permission.READ_VOICEMAIL)); in checkCallerHasReadAccess() 102 android.Manifest.permission.WRITE_VOICEMAIL)); in checkCallerHasWriteAccess() 109 android.Manifest.permission.ADD_VOICEMAIL) in packageHasOwnVoicemailAccess() 115 return packageHasPermission(packageName, android.Manifest.permission.READ_VOICEMAIL); in packageHasReadAccess() 120 return packageHasPermission(packageName, android.Manifest.permission.WRITE_VOICEMAIL); in packageHasWriteAccess() 124 private boolean packageHasPermission(String packageName, String permission) { in packageHasPermission() argument [all …]
|
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/service/ |
D | RuntimePermissionsUpgradeController.java | 17 package com.android.packageinstaller.permission.service; 26 import android.permission.PermissionManager; 34 import com.android.packageinstaller.permission.model.AppPermissionGroup; 35 import com.android.packageinstaller.permission.model.Permission; 36 import com.android.packageinstaller.permission.utils.ArrayUtils; 37 import com.android.packageinstaller.permission.utils.Utils; 201 Manifest.permission.ACCESS_BACKGROUND_LOCATION)) { in onUpgradeLocked() 203 app.packageName, Manifest.permission.ACCESS_BACKGROUND_LOCATION, in onUpgradeLocked() 291 Manifest.permission.ACCESS_MEDIA_LOCATION)) { in onUpgradeLocked() 295 if (context.checkPermission(Manifest.permission.READ_EXTERNAL_STORAGE, 0, in onUpgradeLocked() [all …]
|
D | RuntimePermissionPresenterServiceLegacyImpl.java | 17 package com.android.packageinstaller.permission.service; 19 import android.content.pm.permission.RuntimePermissionPresentationInfo; 35 List<android.permission.RuntimePermissionPresentationInfo> permissions = in onGetAppPermissions() 43 android.permission.RuntimePermissionPresentationInfo permission = permissions.get(i); in onGetAppPermissions() local 44 legacyPermissions.add(new RuntimePermissionPresentationInfo(permission.getLabel(), in onGetAppPermissions() 45 permission.isGranted(), permission.isStandard())); in onGetAppPermissions()
|
D | PermissionControllerServiceImpl.java | 17 package com.android.packageinstaller.permission.service; 23 import static android.permission.PermissionControllerManager.COUNT_ONLY_WHEN_GRANTED; 24 import static android.permission.PermissionControllerManager.COUNT_WHEN_SYSTEM; 25 import static android.permission.PermissionControllerManager.REASON_INSTALLER_POLICY_VIOLATION; 26 import static android.permission.PermissionControllerManager.REASON_MALWARE; 29 import static com.android.packageinstaller.permission.utils.Utils.shouldShowPermission; 38 import android.permission.PermissionControllerService; 39 import android.permission.PermissionManager; 40 import android.permission.RuntimePermissionPresentationInfo; 41 import android.permission.RuntimePermissionUsageInfo; [all …]
|
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/ |
D | ManagePermissionsActivity.java | 17 package com.android.packageinstaller.permission.ui; 34 import com.android.packageinstaller.permission.ui.auto.AutoAllAppPermissionsFragment; 35 import com.android.packageinstaller.permission.ui.auto.AutoAppPermissionsFragment; 36 import com.android.packageinstaller.permission.ui.auto.AutoManageStandardPermissionsFragment; 37 import com.android.packageinstaller.permission.ui.auto.AutoPermissionAppsFragment; 38 import com.android.packageinstaller.permission.ui.handheld.ManageStandardPermissionsFragment; 39 import com.android.packageinstaller.permission.ui.wear.AppPermissionsFragmentWear; 82 com.android.packageinstaller.permission.ui.television in onCreate() 120 fragment = com.android.packageinstaller.permission.ui.television in onCreate() 124 androidXFragment = com.android.packageinstaller.permission.ui.handheld in onCreate() [all …]
|
D | GrantPermissionsActivity.java | 17 package com.android.packageinstaller.permission.ui; 32 import static com.android.packageinstaller.permission.ui.GrantPermissionsViewHandler.DENIED; 33 import static com.android.packageinstaller.permission.ui.GrantPermissionsViewHandler.DENIED_DO_NOT_… 34 import static com.android.packageinstaller.permission.ui.GrantPermissionsViewHandler.GRANTED_ALWAYS; 35 import static com.android.packageinstaller.permission.ui.GrantPermissionsViewHandler.GRANTED_FOREGR… 36 import static com.android.packageinstaller.permission.utils.Utils.getRequestMessage; 50 import android.permission.PermissionManager; 67 import com.android.packageinstaller.permission.model.AppPermissionGroup; 68 import com.android.packageinstaller.permission.model.AppPermissions; 69 import com.android.packageinstaller.permission.model.Permission; [all …]
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | PermissionsUtil.java | 19 import android.Manifest.permission; 39 public static final String PHONE = permission.CALL_PHONE; 40 public static final String CONTACTS = permission.READ_CONTACTS; 41 public static final String LOCATION = permission.ACCESS_FINE_LOCATION; 55 public static boolean hasPermission(Context context, String permission) { in hasPermission() argument 56 return ContextCompat.checkSelfPermission(context, permission) in hasPermission() 95 String permission) { in registerPermissionReceiver() argument 96 final IntentFilter filter = new IntentFilter(permission); in registerPermissionReceiver() 104 public static void notifyPermissionGranted(Context context, String permission) { in notifyPermissionGranted() argument 105 final Intent intent = new Intent(permission); in notifyPermissionGranted()
|
/packages/apps/Dialer/java/com/android/voicemail/ |
D | VoicemailPermissionHelper.java | 19 import android.Manifest.permission; 34 permission.ADD_VOICEMAIL, 35 permission.WRITE_VOICEMAIL, 36 permission.READ_VOICEMAIL, 37 permission.READ_PHONE_STATE, 38 permission.SEND_SMS 53 for (String permission : VOICEMAIL_PERMISSIONS) { in getMissingPermissions() 54 if (context.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { in getMissingPermissions() 55 result.add(permission); in getMissingPermissions()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/ |
D | ContactsPermissions.java | 38 public static boolean hasCallerOrSelfPermission(Context context, String permission) { in hasCallerOrSelfPermission() argument 44 ok = context.checkCallingOrSelfPermission(permission) in hasCallerOrSelfPermission() 49 + " perm=" + permission in hasCallerOrSelfPermission() 57 public static void enforceCallingOrSelfPermission(Context context, String permission) { in enforceCallingOrSelfPermission() argument 58 final boolean ok = hasCallerOrSelfPermission(context, permission); in enforceCallingOrSelfPermission() 61 permission)); in enforceCallingOrSelfPermission() 65 public static boolean hasPackagePermission(Context context, String permission, String pkg) { in hasPackagePermission() argument 70 ok = context.getPackageManager().checkPermission(permission, pkg) in hasPackagePermission() 75 + " perm=" + permission in hasPackagePermission()
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | LocalCallingIdentity.java | 19 import static android.Manifest.permission.ACCESS_MEDIA_LOCATION; 20 import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE; 21 import static android.Manifest.permission.WRITE_MEDIA_STORAGE; 155 public boolean hasPermission(int permission) { in hasPermission() argument 156 if ((hasPermissionResolved & permission) == 0) { in hasPermission() 157 if (hasPermissionInternal(permission)) { in hasPermission() 158 hasPermission |= permission; in hasPermission() 160 hasPermissionResolved |= permission; in hasPermission() 162 return (hasPermission & permission) != 0; in hasPermission() 165 private boolean hasPermissionInternal(int permission) { in hasPermissionInternal() argument [all …]
|
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/handheld/ |
D | ReviewPermissionsFragment.java | 17 package com.android.packageinstaller.permission.ui.handheld; 49 import com.android.packageinstaller.permission.model.AppPermissionGroup; 50 import com.android.packageinstaller.permission.model.AppPermissions; 51 import com.android.packageinstaller.permission.model.Permission; 52 import com.android.packageinstaller.permission.ui.ManagePermissionsActivity; 53 import com.android.packageinstaller.permission.utils.ArrayUtils; 54 import com.android.packageinstaller.permission.utils.Utils; 175 final Permission permission = group.getPermissions().get(j); in grantReviewedPermission() local 176 if (permission.isReviewRequired()) { in grantReviewedPermission() 178 permissionsToGrant, permission.getName()); in grantReviewedPermission() [all …]
|
D | AllAppPermissionsFragment.java | 17 package com.android.packageinstaller.permission.ui.handheld; 46 import com.android.packageinstaller.permission.model.AppPermissionGroup; 47 import com.android.packageinstaller.permission.model.Permission; 48 import com.android.packageinstaller.permission.utils.ArrayUtils; 49 import com.android.packageinstaller.permission.utils.Utils; 297 String permission) { in getPermissionForegroundGroup() argument 303 if (currentPermissionGroup.hasPermission(permission)) { in getPermissionForegroundGroup() 309 permission)) { in getPermissionForegroundGroup() 317 getContext(), packageInfo, permission, false); in getPermissionForegroundGroup() 327 MyMultiTargetSwitchPreference(Context context, String permission, in MyMultiTargetSwitchPreference() argument [all …]
|
D | AppPermissionFragment.java | 17 package com.android.packageinstaller.permission.ui.handheld; 60 import com.android.packageinstaller.permission.model.AppPermissionGroup; 61 import com.android.packageinstaller.permission.model.Permission; 62 import com.android.packageinstaller.permission.ui.AppPermissionActivity; 63 import com.android.packageinstaller.permission.utils.LocationUtils; 64 import com.android.packageinstaller.permission.utils.PackageRemovalMonitor; 65 import com.android.packageinstaller.permission.utils.SafetyNetLogger; 66 import com.android.packageinstaller.permission.utils.Utils; 346 Permission permission = permissions.get(i); in createPermissionSnapshot() local 347 permissionSnapshot.add(new PermissionState(permission.getName(), in createPermissionSnapshot() [all …]
|
/packages/apps/SampleLocationAttribution/src/com/example/android/locationattribution/ |
D | MainActivity.java | 92 if (isLocationPermissionGranted(Manifest.permission.ACCESS_FINE_LOCATION)) { in createModifyLocationSettingsButtonClickListener() 94 Manifest.permission.ACCESS_BACKGROUND_LOCATION)) { in createModifyLocationSettingsButtonClickListener() 98 Manifest.permission.ACCESS_BACKGROUND_LOCATION)) { in createModifyLocationSettingsButtonClickListener() 118 Manifest.permission.ACCESS_FINE_LOCATION)) { in createModifyLocationSettingsButtonClickListener() 136 new String[]{Manifest.permission.ACCESS_FINE_LOCATION, 137 Manifest.permission.ACCESS_BACKGROUND_LOCATION}, 143 new String[]{Manifest.permission.ACCESS_BACKGROUND_LOCATION}, 156 editor.putBoolean(Manifest.permission.ACCESS_FINE_LOCATION, isFirstTime).apply(); 162 MODE_PRIVATE).getBoolean(Manifest.permission.ACCESS_FINE_LOCATION, true);
|
/packages/apps/Dialer/java/com/android/dialer/telecom/ |
D | TelecomUtil.java | 20 import android.Manifest.permission; 191 if (!hasPermission(context, permission.READ_PHONE_STATE)) { in getSubscriptionInfo() 274 || (hasPermission(context, Manifest.permission.READ_VOICEMAIL) in hasReadWriteVoicemailPermissions() 275 && hasPermission(context, Manifest.permission.WRITE_VOICEMAIL)); in hasReadWriteVoicemailPermissions() 282 || hasPermission(context, Manifest.permission.MODIFY_PHONE_STATE); in hasModifyPhoneStatePermission() 288 return isDefaultDialer(context) || hasPermission(context, Manifest.permission.READ_PHONE_STATE); in hasReadPhoneStatePermission() 294 return isDefaultDialer(context) || hasPermission(context, Manifest.permission.CALL_PHONE); in hasCallPhonePermission() 297 private static boolean hasPermission(Context context, String permission) { in hasPermission() argument 298 return instance.hasPermission(context, permission); in hasPermission() 311 @RequiresPermission(permission.READ_PHONE_STATE) [all …]
|
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/auto/ |
D | AutoAllAppPermissionsFragment.java | 17 package com.android.packageinstaller.permission.ui.auto; 45 import com.android.packageinstaller.permission.model.AppPermissionGroup; 46 import com.android.packageinstaller.permission.model.Permission; 47 import com.android.packageinstaller.permission.utils.ArrayUtils; 48 import com.android.packageinstaller.permission.utils.Utils; 276 String permission) { in getPermissionForegroundGroup() argument 282 if (currentPermissionGroup.hasPermission(permission)) { in getPermissionForegroundGroup() 288 permission)) { in getPermissionForegroundGroup() 296 getContext(), packageInfo, permission, /* delayChanges= */ false); in getPermissionForegroundGroup() 309 MyMultiTargetSwitchPreference(Context context, String permission, in MyMultiTargetSwitchPreference() argument [all …]
|
/packages/apps/UniversalMediaPlayer/java/com/android/pump/fragment/ |
D | PermissionFragment.java | 46 Manifest.permission.INTERNET, 47 Manifest.permission.READ_EXTERNAL_STORAGE, 48 Manifest.permission.WRITE_EXTERNAL_STORAGE 101 for (String permission : REQUIRED_PERMISSIONS) { in requestMissingRequiredPermissions() 102 if (ContextCompat.checkSelfPermission(requireContext(), permission) in requestMissingRequiredPermissions() 104 missing.add(permission); in requestMissingRequiredPermissions() 105 mShowRationale |= shouldShowRequestPermissionRationale(permission); in requestMissingRequiredPermissions()
|