/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/ |
D | HealthConnectPermissionHelper.java | 98 @NonNull String packageName, @NonNull String permissionName, @NonNull UserHandle user) { in grantHealthPermission() argument 100 Objects.requireNonNull(permissionName); in grantHealthPermission() 102 enforceValidHealthPermission(permissionName); in grantHealthPermission() 108 mPackageManager.grantRuntimePermission(packageName, permissionName, checkedUser); in grantHealthPermission() 110 permissionName, in grantHealthPermission() 115 addToPriorityListIfRequired(packageName, permissionName); in grantHealthPermission() 125 @NonNull String permissionName, in revokeHealthPermission() argument 129 Objects.requireNonNull(permissionName); in revokeHealthPermission() 131 enforceValidHealthPermission(permissionName); in revokeHealthPermission() 137 mPackageManager.checkPermission(permissionName, packageName) in revokeHealthPermission() [all …]
|
D | DataPermissionEnforcer.java | 73 String permissionName = in enforceRecordIdsReadPermissions() local 78 permissionName, attributionSource, recordTypeId, /* isReadPermission= */ true); in enforceRecordIdsReadPermissions() 154 for (String permissionName : recordTypeIdToExtraPerms.get(recordTypeId)) { in enforceRecordsWritePermissions() 156 permissionName, in enforceRecordsWritePermissions() 221 String permissionName = in enforceRecordIdWritePermissionInternal() local 226 permissionName, attributionSource, recordTypeId, /* isReadPermission= */ false); in enforceRecordIdWritePermissionInternal() 231 String permissionName, in enforceRecordPermission() argument 235 if (!isPermissionGranted(permissionName, attributionSource)) { in enforceRecordPermission() 240 + permissionName in enforceRecordPermission() 249 String permissionName, AttributionSource attributionSource) { in isPermissionGranted() argument [all …]
|
D | MedicalDataPermissionEnforcer.java | 100 String permissionName, AttributionSource attributionSource, boolean isReadPermission) { in enforceMedicalResourcePermission() argument 101 if (!isPermissionGranted(permissionName, attributionSource)) { in enforceMedicalResourcePermission() 104 throw new SecurityException("Caller doesn't have " + permissionName + prohibitedAction); in enforceMedicalResourcePermission() 109 String permissionName, AttributionSource attributionSource) { in isPermissionGranted() argument 111 permissionName, attributionSource, null) in isPermissionGranted()
|
/packages/modules/Permission/tests/cts/permissionpolicy/src/android/permissionpolicy/cts/ |
D | SignaturePermissionAllowlistConfigTest.kt | 45 packageInfo.requestedPermissions?.forEach { permissionName -> in <lambda>() method 46 if (permissionName in platformSignaturePermissionNames) { in <lambda>() 47 if (permissionNames?.contains(permissionName) != true) { in <lambda>() 50 } += permissionName in <lambda>() 82 val permissionName = line.substring("Permission: ".length) in <lambda>() constant 83 permissionNames += permissionName in <lambda>() 99 packageInfo.requestedPermissions?.forEachIndexed { index, permissionName -> in <lambda>() method 101 if (permissionName in platformSignaturePermissionNames) { in <lambda>() 105 } += permissionName in <lambda>() 139 for (permissionName in permissionNames) { in <lambda>() method [all …]
|
/packages/apps/TV/common/src/com/android/tv/common/feature/ |
D | PermissionFeature.java | 28 private final String permissionName; field in PermissionFeature 30 private PermissionFeature(String permissionName) { in PermissionFeature() argument 31 this.permissionName = permissionName; in PermissionFeature() 36 return context.checkSelfPermission(permissionName) == PackageManager.PERMISSION_GRANTED; in isEnabled()
|
/packages/apps/Car/Settings/src/com/android/car/settings/privacy/ |
D | PermissionUtils.java | 119 for (String permissionName: permissionNames) { in getPackagesWithPermissionGroup() 121 new String[]{permissionName}, PackageManager.GET_PERMISSIONS); in getPackagesWithPermissionGroup() 129 getPermissionState(context, packageInfo, permissionName, userHandle); in getPackagesWithPermissionGroup() 150 String permissionName, UserHandle userHandle) { in getPermissionState() argument 151 int permissionFlags = context.getPackageManager().getPermissionFlags(permissionName, in getPermissionState() 158 permissionName); in getPermissionState() 162 permInfo = context.getPackageManager().getPermissionInfo(permissionName, 0); in getPermissionState() 212 for (String permissionName : permissionNames) { in getPermissionGroupGrantStatus() 214 getPermissionState(context, packageInfo, permissionName, userHandle); in getPermissionGroupGrantStatus() 216 permissionNameToState.put(permissionName, permState); in getPermissionGroupGrantStatus()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | LightPermInfoLiveData.kt | 35 private constructor(private val app: Application, private val permissionName: String) : constant in com.android.permissioncontroller.permission.data.LightPermInfoLiveData 70 LightPermInfo(app.packageManager.getPermissionInfo(permissionName, 0)) in loadDataAndPostValue() 72 Log.w(LOG_TAG, "Permission \"$permissionName\" not found") in loadDataAndPostValue() 73 invalidateSingle(permissionName) in loadDataAndPostValue() 94 return isRuntimePlatformPermission(permissionName) in isImmutable()
|
D | PermStateLiveData.kt | 90 for ((index, permissionName) in packageInfo.requestedPermissions.withIndex()) { in <lambda>() constant 91 permissionGroup.permissionInfos[permissionName]?.let { permInfo -> in <lambda>() 102 permissionStates[permissionName] = PermState(permFlags, granted) in <lambda>()
|
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/api/ |
D | HealthPermissionManagerImpl.kt | 44 override fun grantHealthPermission(packageName: String, permissionName: String) { in grantHealthPermission() 45 manager.grantHealthPermission(packageName, permissionName) in grantHealthPermission() 48 override fun revokeHealthPermission(packageName: String, permissionName: String) { in revokeHealthPermission() 49 manager.revokeHealthPermission(packageName, permissionName, /* reason= */ "") in revokeHealthPermission()
|
D | HealthPermissionManager.kt | 33 fun grantHealthPermission(packageName: String, permissionName: String) 35 fun revokeHealthPermission(packageName: String, permissionName: String)
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/legacy/ |
D | AppPermissionActivity.java | 98 String permissionName = getIntent().getStringExtra(Intent.EXTRA_PERMISSION_NAME); in onCreate() local 100 if (permissionName == null && groupName == null) { in onCreate() 107 groupName = PermissionMapping.getGroupOfPlatformPermission(permissionName); in onCreate() 110 permission = getPackageManager().getPermissionInfo(permissionName, 0); in onCreate() 158 androidXFragment = AutoAppPermissionFragment.newInstance(packageName, permissionName, in onCreate() 167 packageName, permissionName, groupName, userHandle, null, 0, null)); in onCreate()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/ |
D | ManagePermissionsActivity.java | 206 String permissionName; in onCreate() local 285 permissionName = getIntent().getStringExtra(Intent.EXTRA_PERMISSION_NAME); in onCreate() 288 if (permissionName == null && groupName == null) { in onCreate() 299 groupName = getGroupFromPermission(permissionName); in onCreate() 312 args = WearAppPermissionFragment.createArgs(packageName, permissionName, in onCreate() 315 args = AppPermissionFragment.createArgs(packageName, permissionName, in onCreate() 407 permissionName = getIntent().getStringExtra(Intent.EXTRA_PERMISSION_NAME); in onCreate() 415 permissionName, 0); in onCreate() 418 Log.i(LOG_TAG, "Permission " + permissionName + " does not exist"); in onCreate() 423 permissionGroupName = permissionName; in onCreate() [all …]
|
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | DevicePermissionsTest.kt | 508 private fun revokeSelfPermission(permissionName: String, context: Context) { in hasPermission() 511 intent.putExtra("permissionName", permissionName) in hasPermission() 517 private fun grantPermissionAndAssertGranted(permissionName: String, context: Context) { in grantPermissionAndAssertGranted() 520 permissionName, in grantPermissionAndAssertGranted() 523 assertPermission(permissionName, PERMISSION_GRANTED, context) in grantPermissionAndAssertGranted() 526 private fun revokePermissionAndAssertDenied(permissionName: String, context: Context) { in revokePermissionAndAssertDenied() 529 permissionName, in revokePermissionAndAssertDenied() 532 assertPermission(permissionName, PERMISSION_DENIED, context) in revokePermissionAndAssertDenied() 536 permissionName: String, in assertPermission() 540 assertThat(context.packageManager.checkPermission(permissionName, TEST_PACKAGE_NAME)) in assertPermission()
|
D | RevokeSelfPermissionTest.java | 323 private void assertGrantedState(String s, String permissionName, int permissionGranted, in assertGrantedState() argument 326 mContext.getPackageManager().checkPermission(permissionName, APP_PKG_NAME)), in assertGrantedState() 330 private void assertGranted(long timeoutMillis, String permissionName) { in assertGranted() argument 331 assertGrantedState("Permission was never granted", permissionName, in assertGranted() 335 private void assertDenied(long timeoutMillis, String permissionName) { in assertDenied() argument 336 assertGrantedState("Permission was never revoked", permissionName, in assertDenied()
|
D | RevokeSawPermissionTest.kt | 52 private fun assertAppHasPermission(permissionName: String, expectPermission: Boolean) { in assertAppHasPermission() 62 .checkPermission(permissionName, APP_PKG_NAME) in assertAppHasPermission()
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/di/ |
D | FakeHealthPermissionManager.kt | 55 override fun grantHealthPermission(packageName: String, permissionName: String) { in grantHealthPermission() 57 permissions.add(permissionName) in grantHealthPermission() 61 override fun revokeHealthPermission(packageName: String, permissionName: String) { in revokeHealthPermission() 63 permissions.remove(permissionName) in revokeHealthPermission()
|
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/service/ |
D | RuntimePermissionsUpgradeControllerTest.kt | 184 val permissionName = it.arguments[0] as String in <lambda>() constant 190 ?.find { it.name == permissionName } in <lambda>() 225 val permissionName = it.arguments[0] as String in <lambda>() constant 230 .getPermissionInfo(permissionName, 0) in <lambda>() 274 for (permissionName in permissionNames) { in <lambda>() method 278 permissionName, in <lambda>() 285 for (permissionName in permissionNames) { in <lambda>() method 287 .addWhitelistedRestrictedPermission(eq(packageName), eq(permissionName), anyInt()) in <lambda>() 291 private fun verifyGranted(packageName: String, permissionName: String) { in <lambda>() 293 .grantRuntimePermission(eq(packageName), eq(permissionName), any()) in <lambda>() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/development/ |
D | AppPicker.java | 52 final String permissionName = getIntent().getStringExtra(EXTRA_REQUESTIING_PERMISSION); in onCreate() local 56 AppPickerFragment.newInstance(permissionName, debuggableOnly), in onCreate() 66 public static AppPickerFragment newInstance(String permissionName, boolean debuggableOnly) { in newInstance() argument 69 b.putString(EXTRA_REQUESTIING_PERMISSION, permissionName); in newInstance()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/repository/v31/ |
D | PermissionRepository.kt | 44 permissionName: String, in getPermissionFlags() 78 permissionName: String, in getPermissionFlags() 83 packageManager.getPermissionFlags(permissionName, packageName, user) in getPermissionFlags()
|
/packages/modules/Permission/tests/cts/permission/AppThatRequestDevicePermissions/src/android/permission/cts/appthatrequestpermission/ |
D | RevokeSelfPermissionReceiver.kt | 27 val permissionName = intent.getStringExtra("permissionName")!! in onReceive() constant 30 deviceContext.revokeSelfPermissionOnKill(permissionName) in onReceive()
|
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/data/repository/ |
D | FakePermissionRepository.kt | 28 permissionName: String, in getPermissionFlags() 32 return permissionFlags[permissionName] ?: 0 in getPermissionFlags()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/ |
D | SoftRestrictedPermissionPolicy.java | 72 public static boolean shouldShow(@NonNull LightPackageInfo pkg, @NonNull String permissionName, in shouldShow() argument 74 switch (permissionName) { in shouldShow()
|
D | AndroidUtils.kt | 60 permissionName: String, in PackageManager() 68 updatePermissionFlags(permissionName, packageName, mask, value, user) in PackageManager()
|
/packages/modules/AdServices/sdksandbox/tests/cts/endtoendtests/src/com/android/tests/sdksandbox/endtoend/ |
D | CustomizedSdkContextTest.java | 100 final String permissionName = sdkSandboxPackage.requestedPermissions[i]; in testSdkPermissions() local 102 boolean result = mSdk.isPermissionGranted(permissionName, useApplicationContext); in testSdkPermissions() 105 + permissionName in testSdkPermissions()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ |
D | HealthPermissionsPresenceTest.java | 212 for (String permissionName : HEALTH_PERMISSIONS) { in testHealthPermissions_isDefined() 213 assertHealthPermissionIsDefined(permissionName); in testHealthPermissions_isDefined() 226 private void assertHealthPermissionIsDefined(String permissionName) throws Exception { in assertHealthPermissionIsDefined() argument 228 mPackageManager.getPermissionInfo(permissionName, PackageManager.GET_META_DATA); in assertHealthPermissionIsDefined()
|