/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/permission/utils/ |
D | GrantRevokeTests.kt | 143 for ((permName, isGranted) in perms) { in createMockPackage() constant 144 permNames.add(permName) in createMockPackage() 176 permName: String, in createMockPerm() 182 val permInfo = LightPermInfo(permName, TEST_PACKAGE_NAME, PERM_GROUP_NAME, backgroundPerm, in createMockPerm() 185 pkgInfo.requestedPermissionsFlags[pkgInfo.requestedPermissions.indexOf(permName)] in createMockPerm() 249 for ((permName, state) in expectedState) { in assertGroupPermState() constant 253 assertWithMessage("permission $permName grant state incorrect") in assertGroupPermState() 254 .that(perms[permName]?.isGrantedIncludingAppOp).isEqualTo(granted) in assertGroupPermState() 256 val actualFlags = perms[permName]!!.flags in assertGroupPermState() 257 assertWithMessage("permission $permName flags incorrect, expected" + in assertGroupPermState() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/ |
D | KotlinUtils.kt | 234 fun getPermInfoLabel(context: Context, permName: String): CharSequence { in <lambda>() 236 context.packageManager.getPermissionInfo(permName, 0).loadSafeLabel( in <lambda>() 239 permName in <lambda>() 251 fun getPermInfoIcon(context: Context, permName: String): Drawable? { in <lambda>() 253 val permInfo = context.packageManager.getPermissionInfo(permName, 0) in <lambda>() 281 fun getPermInfoDescription(context: Context, permName: String): CharSequence { in <lambda>() 283 val permInfo = context.packageManager.getPermissionInfo(permName, 0) in <lambda>() 390 permName: String, in <lambda>() 398 if (targetSdk < splitPerm.targetSdk && splitPerm.newPermissions.contains(permName)) { in <lambda>() 433 for ((permName, perm) in group.permissions) { in <lambda>() constant [all …]
|
D | Utils.java | 494 String permName = permissions.get(i); in getPlatformPermissionsOfGroup() local 497 permInfo = pm.getPermissionInfo(permName, 0); in getPlatformPermissionsOfGroup() 499 throw new IllegalStateException(permName + " not defined by platform", e); in getPlatformPermissionsOfGroup()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | PackagePermissionsLiveData.kt | 60 for (permName in packageInfo.requestedPermissions) { in loadDataAndPostValue() constant 61 var groupName = Utils.getGroupOfPlatformPermission(permName) in loadDataAndPostValue() 64 app.packageManager.getPermissionInfo(permName, 0) in loadDataAndPostValue() 96 groupName = Utils.getGroupOfPermission(permInfo) ?: permName in loadDataAndPostValue() 99 permissionMap.getOrPut(groupName) { mutableListOf() }.add(permName) in loadDataAndPostValue()
|
D | LightAppPermGroupLiveData.kt | 110 for ((permName, permState) in permStates) { in <lambda>() constant 111 val permInfo = permGroup.permissionInfos[permName] ?: continue in <lambda>() 112 val foregroundPerms = allForegroundPerms[permName] in <lambda>() 113 permissionMap[permName] = LightPermission(packageInfo, permInfo, permState, in <lambda>() 163 for (permName in newPerms) { in <lambda>() constant 164 val newPerm = permissionMap[permName]?.permInfo ?: continue in <lambda>()
|
D | PermGroupUsageLiveData.kt | 45 val appops = getPlatformPermissionNamesOfGroup(permGroup).mapNotNull { permName -> in <lambda>() method 46 permissionToOp(permName) in <lambda>()
|
D | AppPermGroupUiInfoLiveData.kt | 255 for ((permName, permState) in permissionState) { in <lambda>() variable 256 val permInfo = allPermInfos[permName] ?: continue in <lambda>()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/ |
D | AllAppPermissionsFragment.java | 193 for (String permName : permissions) { in updateUi() 194 pref.addPreference(getPreference(permName, groupName)); in updateUi() 241 private Preference getPreference(String permName, String groupName) { in getPreference() argument 247 permName); in getPreference() 251 pref = new MyMultiTargetSwitchPreference(context, permName, appPermGroup); in getPreference() 255 pref.setIcon(KotlinUtils.INSTANCE.getPermInfoIcon(context, permName)); in getPreference() 256 pref.setTitle(KotlinUtils.INSTANCE.getPermInfoLabel(context, permName)); in getPreference() 259 permName); in getPreference()
|
D | AppPermissionFragment.java | 141 @Nullable String permName, @Nullable String groupName, in createArgs() argument 147 arguments.putString(Intent.EXTRA_PERMISSION_NAME, permName); in createArgs()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/ |
D | PermissionControllerServiceModel.kt | 165 for (permName in permissionNames) { in <lambda>() constant 167 service.packageManager.getPermissionInfo(permName, 0) in <lambda>() 173 permToGroup[permName] = Utils.getGroupOfPermission(permInfo) in <lambda>() 181 for (permName in permToGroup.keys) { in <lambda>() constant 182 if (requestedPermissions.contains(permName)) { in <lambda>() 184 permToGroup[permName]!!, Process.myUserHandle()]) in <lambda>()
|
D | PermissionControllerServiceImpl.java | 544 String permName = expandedPermissions.get(i); in onSetRuntimePermissionGrantStateByDeviceAdmin() local 545 AppPermissionGroup group = app.getGroupForPermission(permName); in onSetRuntimePermissionGrantStateByDeviceAdmin() 550 Permission perm = group.getPermission(permName); in onSetRuntimePermissionGrantStateByDeviceAdmin() 560 group.grantRuntimePermissions(false, false, new String[]{permName}); in onSetRuntimePermissionGrantStateByDeviceAdmin() 561 autoGrantPermissionsNotifier.onPermissionAutoGranted(permName); in onSetRuntimePermissionGrantStateByDeviceAdmin() 569 group.revokeRuntimePermissions(false, new String[]{permName}); in onSetRuntimePermissionGrantStateByDeviceAdmin() 686 String permName = permission.getName(); in logOneTimeSessionRevoke() local 690 + permName + " isImplicit=false" + " result=" + r); in logOneTimeSessionRevoke() 694 requestId, uid, packageName, permName, false, r); in logOneTimeSessionRevoke()
|
D | BackupHelper.java | 406 String permName = parser.getAttributeValue(null, ATTR_PERMISSION_NAME); in parseFromXml() local 407 if (permName == null) { in parseFromXml() 413 expandedPermissions.add(permName); in parseFromXml() 424 && permName.equals(splitPerm.getSplitPermission())) { in parseFromXml()
|
D | AutoRevokePermissions.kt | 117 for (permName in revocablePermissions) { in <lambda>() constant 120 sessionId, uid, packageName, permName, false, SERVER_LOG_ID) in <lambda>()
|
D | RuntimePermissionsUpgradeController.kt | 562 for (permName in filterPermissions) { in <lambda>() constant 563 val permission = permissionGroup.permissions[permName] ?: continue in <lambda>()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/wear/ |
D | AppPermissionsFragmentWear.java | 284 private static Permission getPermissionFromGroup(AppPermissionGroup group, String permName) { in getPermissionFromGroup() argument 289 if(currentPerm.getName().equals(permName)) { in getPermissionFromGroup() 296 permName, group.getName())); in getPermissionFromGroup() 301 String.format("Permission %s is not in group %s", permName, group.getName())); in getPermissionFromGroup() 305 private void revokePermissionInGroup(AppPermissionGroup group, String permName) { in revokePermissionInGroup() argument 306 group.revokeRuntimePermissions(true, new String[]{ permName }); in revokePermissionInGroup()
|
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/ |
D | GetPermissionGroupInfoTest.kt | 56 for (permName in perms) { in assertAllPlatformPermGroupsMatch() constant 59 packageManager.getGroupOfPlatformPermission(permName, context.mainExecutor) { in assertAllPlatformPermGroupsMatch() 64 assertThat(permGroup).isEqualTo(Utils.getGroupOfPlatformPermission(permName)) in assertAllPlatformPermGroupsMatch()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/television/ |
D | AppPermissionFragment.java | 125 @Nullable String permName, @Nullable String groupName, in createArgs() argument 131 arguments.putString(Intent.EXTRA_PERMISSION_NAME, permName); in createArgs()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/auto/ |
D | AutoAppPermissionFragment.java | 117 @NonNull String permName, @Nullable String groupName, @NonNull UserHandle userHandle) { in newInstance() argument 122 arguments.putString(Intent.EXTRA_PERMISSION_NAME, permName); in newInstance()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/model/ |
D | AppPermissionViewModel.kt | 767 for ((permName, permission) in oldGroup.permissions) { in <lambda>() constant 768 val newPermission = newGroup.permissions[permName] ?: continue in <lambda>()
|