Home
last modified time | relevance | path

Searched refs:permissionInfo (Results 1 – 18 of 18) sorted by relevance

/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/model/legacy/
DPermissionGroups.java256 for (PermissionInfo permissionInfo : installedPackage.permissions) { in getPermissionGroups()
258 if (!seenPermissions.add(permissionInfo.name)) { in getPermissionGroups()
263 if (permissionInfo.getProtection() != PermissionInfo.PROTECTION_DANGEROUS in getPermissionGroups()
264 || (permissionInfo.flags & PermissionInfo.FLAG_INSTALLED) == 0) { in getPermissionGroups()
270 permissionInfo.name)) { in getPermissionGroups()
275 if (!requestedPermissions.contains(permissionInfo.name)) { in getPermissionGroups()
279 CharSequence label = loadItemInfoLabel(context, permissionInfo); in getPermissionGroups()
280 Drawable icon = loadItemInfoIcon(context, permissionInfo); in getPermissionGroups()
282 PermissionApps permApps = new PermissionApps(context, permissionInfo.name, in getPermissionGroups()
287 PermissionGroup group = new PermissionGroup(permissionInfo.name, in getPermissionGroups()
[all …]
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/model/
DPermission.java89 PermissionInfo permissionInfo; in isAvailableAsUser() local
91 permissionInfo = userPackageManager.getPermissionInfo(mName, 0); in isAvailableAsUser()
95 return permissionInfo.getProtection() == PermissionInfo.PROTECTION_DANGEROUS in isAvailableAsUser()
96 || (permissionInfo.getProtectionFlags() & PermissionInfo.PROTECTION_FLAG_ROLE) in isAvailableAsUser()
98 || (permissionInfo.getProtectionFlags() & PermissionInfo.PROTECTION_FLAG_APPOP) in isAvailableAsUser()
DRoleParser.java1186 PermissionInfo permissionInfo; in validatePermission() local
1188 permissionInfo = packageManager.getPermissionInfo(permission, 0); in validatePermission()
1194 if (!(permissionInfo.getProtection() == PermissionInfo.PROTECTION_DANGEROUS in validatePermission()
1195 || (permissionInfo.getProtectionFlags() & PermissionInfo.PROTECTION_FLAG_ROLE) in validatePermission()
1212 PermissionInfo permissionInfo; in validateAppOpPermission() local
1214 permissionInfo = packageManager.getPermissionInfo(appOpPermission, 0); in validateAppOpPermission()
1218 if ((permissionInfo.getProtectionFlags() & PermissionInfo.PROTECTION_FLAG_APPOP) in validateAppOpPermission()
1230 PermissionInfo permissionInfo; in validateAppOp() local
1232 permissionInfo = packageManager.getPermissionInfo(permission, 0); in validateAppOp()
1236 if (permissionInfo.getProtection() == PermissionInfo.PROTECTION_DANGEROUS) { in validateAppOp()
DPermissions.java748 PermissionInfo permissionInfo = null; in isRestrictedPermission() local
750 permissionInfo = packageManager.getPermissionInfo(permission, 0); in isRestrictedPermission()
756 boolean isRestrictedPermission = permissionInfo != null in isRestrictedPermission()
757 && (permissionInfo.flags & (PermissionInfo.FLAG_SOFT_RESTRICTED in isRestrictedPermission()
792 PermissionInfo permissionInfo = permissionInfos.get(permissionInfosIndex); in createForegroundBackgroundPermissionMappings() local
794 String permission = permissionInfo.name; in createForegroundBackgroundPermissionMappings()
797 String backgroundPermission = permissionInfo.backgroundPermission; in createForegroundBackgroundPermissionMappings()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/model/
DPermission.java47 public Permission(String name, @NonNull PermissionInfo permissionInfo, boolean granted, in Permission() argument
49 mPermissionInfo = permissionInfo; in Permission()
51 mBackgroundPermissionName = permissionInfo.backgroundPermission; in Permission()
57 (permissionInfo.protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTANT) != 0; in Permission()
59 (permissionInfo.protectionLevel & PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY) != 0; in Permission()
DAppPermissionGroup.java175 PermissionInfo permissionInfo; in create() local
177 permissionInfo = context.getPackageManager().getPermissionInfo(permissionName, 0); in create()
182 if ((permissionInfo.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE) in create()
184 || (permissionInfo.flags & PermissionInfo.FLAG_INSTALLED) == 0 in create()
185 || (permissionInfo.flags & PermissionInfo.FLAG_REMOVED) != 0) { in create()
189 String group = PermissionMapping.getGroupOfPermission(permissionInfo); in create()
190 PackageItemInfo groupInfo = permissionInfo; in create()
317 for (PermissionInfo permissionInfo : permissionInfos) { in create()
318 if (requestedPermission.equals(permissionInfo.name)) { in create()
319 requestedPermissionInfo = permissionInfo; in create()
/packages/modules/Permission/tests/cts/permissionui/PermissionPolicyApp25/src/android/permissionui/cts/permissionpolicy/
DTestProtectionFlagsActivity.kt43 val permissionInfo = packageManager.getPermissionInfo(declaredPermissionInfo.name, 0) in <lambda>() constant
45 permissionInfo.protection and in <lambda>()
50 val protectionFlags = permissionInfo.protectionLevel and protection.inv() in <lambda>()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/
DUtils.java474 public static boolean isPermissionDangerousInstalledNotRemoved(PermissionInfo permissionInfo) { in isPermissionDangerousInstalledNotRemoved() argument
475 return permissionInfo != null in isPermissionDangerousInstalledNotRemoved()
476 && permissionInfo.getProtection() == PermissionInfo.PROTECTION_DANGEROUS in isPermissionDangerousInstalledNotRemoved()
477 && (permissionInfo.flags & PermissionInfo.FLAG_INSTALLED) != 0 in isPermissionDangerousInstalledNotRemoved()
478 && (permissionInfo.flags & PermissionInfo.FLAG_REMOVED) == 0; in isPermissionDangerousInstalledNotRemoved()
503 for (PermissionInfo permissionInfo : permissions) { in getPermissionInfosForGroup()
505 PermissionMapping.getGroupOfPlatformPermission(permissionInfo.name); in getPermissionInfosForGroup()
507 undefinedPerms.add(permissionInfo); in getPermissionInfosForGroup()
533 for (PermissionInfo permissionInfo: permissions) { in getInstalledRuntimePermissionInfosForGroup()
534 if (permissionInfo.getProtection() == PermissionInfo.PROTECTION_DANGEROUS in getInstalledRuntimePermissionInfosForGroup()
[all …]
/packages/modules/HealthFitness/tests/unittests/src/android/health/connect/
DHealthPermissionsTest.java166 for (PermissionInfo permissionInfo : permissionInfos) { in testHealthGroupPermissions_noUnexpectedPermissionsDefined()
167 if (permissionInfo.group != null in testHealthGroupPermissions_noUnexpectedPermissionsDefined()
168 && permissionInfo.group.equals(HEALTH_PERMISSION_GROUP)) { in testHealthGroupPermissions_noUnexpectedPermissionsDefined()
171 .contains(permissionInfo.name); in testHealthGroupPermissions_noUnexpectedPermissionsDefined()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/
DAppPermGroupUiInfoLiveData.kt176 for (permissionInfo in permissionInfos) { in <lambda>() variable
178 permissionInfo.protectionFlags and PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY == 0 in <lambda>()
183 if (permissionInfo.protectionFlags and PermissionInfo.PROTECTION_FLAG_INSTANT != 0) { in <lambda>()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/
DManagePermissionsActivity.java326 PermissionInfo permissionInfo; in onCreate() local
328 permissionInfo = getPackageManager() in onCreate()
331 permissionInfo = null; in onCreate()
333 if (permissionInfo == null in onCreate()
334 || !Objects.equals(permissionInfo.packageName, Utils.OS_PKG)) { in onCreate()
/packages/modules/Permission/tests/cts/permissionpolicy/src/android/permissionpolicy/cts/
DRestrictedPermissionsTest.java597 final PermissionInfo permissionInfo = packageManager.getPermissionInfo( in assertAllRestrictedPermissionGranted() local
599 if ((permissionInfo.flags & PermissionInfo.FLAG_HARD_RESTRICTED) != 0) { in assertAllRestrictedPermissionGranted()
620 final PermissionInfo permissionInfo = packageManager.getPermissionInfo( in assertRestrictedPermissionGranted() local
622 if ((permissionInfo.flags & PermissionInfo.FLAG_HARD_RESTRICTED) != 0 in assertRestrictedPermissionGranted()
623 || (permissionInfo.flags & PermissionInfo.FLAG_SOFT_RESTRICTED) != 0) { in assertRestrictedPermissionGranted()
DPermissionPolicyTest.java334 ExpectedPermissionInfo permissionInfo = new ExpectedPermissionInfo( in loadExpectedPermissions() local
342 permissions.add(permissionInfo); in loadExpectedPermissions()
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DPermissionControllerTest.java197 for (RuntimePermissionPresentationInfo permissionInfo : permissionInfos) { in assertRuntimePermissionLabelsAreValid()
198 CharSequence permissionGroupLabel = permissionInfo.getLabel(); in assertRuntimePermissionLabelsAreValid()
202 if (permissionInfo.isStandard()) { in assertRuntimePermissionLabelsAreValid()
207 if (permissionInfo.isGranted()) { in assertRuntimePermissionLabelsAreValid()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/shared/
DHealthPermissionReader.kt197 .map { permissionInfo -> permissionInfo.name } in <lambda>() method
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/util/
DUtilsTest.kt273 for (permissionInfo in permissionInfos!!) { in getGroupPermissionInfos_validGroupName_returnsGroupPermissions() constant
274 permissions.add(permissionInfo.name) in getGroupPermissionInfos_validGroupName_returnsGroupPermissions()
/packages/modules/Permission/tests/cts/role/src/android/app/role/cts/
DRoleManagerTest.java1125 PermissionInfo permissionInfo = sPackageManager.getPermissionInfo( in manageRolesFromControllerPermissionShouldBeDeclaredByPermissionController() local
1128 assertThat(permissionInfo.packageName).isEqualTo( in manageRolesFromControllerPermissionShouldBeDeclaredByPermissionController()
1130 assertThat(permissionInfo.getProtection()).isEqualTo(PermissionInfo.PROTECTION_SIGNATURE); in manageRolesFromControllerPermissionShouldBeDeclaredByPermissionController()
1131 assertThat(permissionInfo.getProtectionFlags()).isEqualTo(0); in manageRolesFromControllerPermissionShouldBeDeclaredByPermissionController()
/packages/modules/AdServices/sdksandbox/tests/cts/endtoendtests/src/com/android/tests/sdksandbox/endtoend/
DSdkSandboxManagerTest.java607 final PermissionInfo permissionInfo = pm.getPermissionInfo(permissionName, 0); in testSdkSandboxPermissions() local
609 .that(permissionInfo.getProtection()) in testSdkSandboxPermissions()