Home
last modified time | relevance | path

Searched refs:isPermissionGranted (Results 1 – 25 of 26) sorted by relevance

12

/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DSharedUidPermissionsTest.java23 import static android.permission.cts.PermissionUtils.isPermissionGranted;
71 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS)).isTrue(); in packageGainsRuntimePermissionsWhenJoiningSharedUid()
72 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_NO_PERMISSIONS, READ_CONTACTS)).isTrue(); in packageGainsRuntimePermissionsWhenJoiningSharedUid()
80 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_PERMISSIONS, INTERNET)).isTrue(); in packageGainsNormalPermissionsWhenJoiningSharedUid()
81 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_NO_PERMISSIONS, INTERNET)).isTrue(); in packageGainsNormalPermissionsWhenJoiningSharedUid()
90 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS)).isTrue(); in grantingRuntimePermissionAffectsAllPackageInSharedUid()
91 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_NO_PERMISSIONS, READ_CONTACTS)).isTrue(); in grantingRuntimePermissionAffectsAllPackageInSharedUid()
101 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS)).isFalse(); in revokingRuntimePermissionAffectsAllPackageInSharedUid()
102 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_NO_PERMISSIONS, READ_CONTACTS)).isFalse(); in revokingRuntimePermissionAffectsAllPackageInSharedUid()
113 assertThat(isPermissionGranted(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS)).isFalse(); in runtimePermissionsCanBeRevokedOnPackageThatDoesNotDeclarePermission()
[all …]
DPermissionControllerTest.java36 import static android.permission.cts.PermissionUtils.isPermissionGranted;
177 if (isPermissionGranted(app, permission)) { in assertRuntimePermissionLabelsAreValid()
456 assertThat(isPermissionGranted(APP2, CUSTOM_PERMISSION)).isEqualTo(false); in revokePermissionCustom()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/
DMedicalDataPermissionEnforcer.java69 if (isPermissionGranted(readPermissionName, attributionSource)) { in enforceMedicalReadAccessAndGetEnforceSelfRead()
73 if (isPermissionGranted(WRITE_MEDICAL_DATA, attributionSource)) { in enforceMedicalReadAccessAndGetEnforceSelfRead()
101 if (!isPermissionGranted(permissionName, attributionSource)) { in enforceMedicalResourcePermission()
108 private boolean isPermissionGranted( in isPermissionGranted() method in MedicalDataPermissionEnforcer
DDataPermissionEnforcer.java200 .filter(permission -> isPermissionGranted(permission, attributionSource)) in collectGrantedExtraReadPermissions()
212 mapping.put(permName, isPermissionGranted(permName, attributionSource)); in collectExtraWritePermissionStateMapping()
235 if (!isPermissionGranted(permissionName, attributionSource)) { in enforceRecordPermission()
248 private boolean isPermissionGranted( in isPermissionGranted() method in DataPermissionEnforcer
/packages/modules/HealthFitness/testapps/toolbox/src/com/android/healthconnect/testapps/toolbox/ui/
DHomeFragment.kt184 private fun isPermissionGranted(permission: String): Boolean { in <lambda>() method in com.android.healthconnect.testapps.toolbox.ui.HomeFragment
191 if (!isPermissionGranted(permission)) { in <lambda>()
200 if (!isPermissionGranted(permission)) { in <lambda>()
209 if (!isPermissionGranted(permission)) { in <lambda>()
266 if (!isPermissionGranted(READ_HEALTH_DATA_IN_BACKGROUND)) { in <lambda>()
278 if (!isPermissionGranted(READ_HEALTH_DATA_HISTORY)) { in <lambda>()
/packages/modules/IntentResolver/java/src/com/android/intentresolver/
DIntentForwarding.kt63 private fun isPermissionGranted(permission: String, uid: Int) = in isPermissionGranted() method
97 if (isPermissionGranted(INTERACT_ACROSS_USERS_FULL, packageUid) == PERMISSION_GRANTED) { in isPermissionGranted()
100 if (isPermissionGranted(INTERACT_ACROSS_USERS, packageUid) == PERMISSION_GRANTED) { in isPermissionGranted()
/packages/apps/Settings/src/com/android/settings/notification/app/
DFullScreenIntentPermissionPreferenceController.kt67 preference.isChecked = isPermissionGranted() in isIncludedInFilter()
75 if (isPermissionGranted() != value) { in onPreferenceChange()
98 private fun isPermissionGranted(): Boolean { in isPermissionGranted() method
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/domain/usecase/v31/
DGetPermissionGroupUsageUseCase.kt183 val isPermissionGranted = in <lambda>() constant
186 if (isPermissionUserSensitive(isPermissionGranted, permFlags)) { in <lambda>()
201 isPermissionGranted: Boolean, in <lambda>()
204 return if (isPermissionGranted) { in <lambda>()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/bluetooth/
DCustomUuidEirFragment.java115 if (!BluetoothPermissionChecker.isPermissionGranted( in onCreateView()
117 || !BluetoothPermissionChecker.isPermissionGranted( in onCreateView()
204 if (BluetoothPermissionChecker.isPermissionGranted( in onCreateView()
234 if (BluetoothPermissionChecker.isPermissionGranted( in onResume()
240 if (BluetoothPermissionChecker.isPermissionGranted( in onResume()
DBluetoothPermissionChecker.java37 public static boolean isPermissionGranted(Activity mActivity, String permission) { in isPermissionGranted() method in BluetoothPermissionChecker
DBluetoothHeadsetFragment.java117 if (!BluetoothPermissionChecker.isPermissionGranted( in checkPermissions()
282 if (BluetoothPermissionChecker.isPermissionGranted( in onResume()
DMapMceTestFragment.java146 if (!BluetoothPermissionChecker.isPermissionGranted(getActivity(), in onCreateView()
249 if (BluetoothPermissionChecker.isPermissionGranted(getActivity(), in onResume()
/packages/modules/Permission/tests/cts/permission/permissionTestUtilLib/src/android/permission/cts/
DPermissionUtils.java159 public static boolean isPermissionGranted(@NonNull String packageName, in isPermissionGranted() method in PermissionUtils
180 if (!isPermissionGranted(packageName, permission)) { in isGranted()
211 if (isPermissionGranted(packageName, ACCESS_COARSE_LOCATION)) { in grantPermission()
218 if (isPermissionGranted(packageName, ACCESS_BACKGROUND_LOCATION)) { in grantPermission()
/packages/apps/Settings/src/com/android/settings/wifi/slice/
DWifiSlice.java120 final boolean isPermissionGranted = in getSlice()
121 isCallerExemptUid(mContext) || isPermissionGranted(mContext); in getSlice()
123 isPermissionGranted); in getSlice()
125 if (!isWifiEnabled || !isPermissionGranted) { in getSlice()
183 private static boolean isPermissionGranted(Context settingsContext) { in isPermissionGranted() method in WifiSlice
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/model/v34/
DAppDataSharingUpdatesViewModel.kt147 appPermGroupUiInfo.isPermissionGranted() in <lambda>()
155 private fun AppPermGroupUiInfo.isPermissionGranted() = in <lambda>() method
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/shadow/
DShadowWifiSlice.java32 protected static boolean isPermissionGranted(Context settingsContext) { in isPermissionGranted() method in ShadowWifiSlice
/packages/apps/Car/Settings/src/com/android/car/settings/applications/specialaccess/
DAppStateAppOpsBridge.java216 public PermissionState(boolean isPermissionGranted) { in PermissionState() argument
217 mIsPermissionGranted = isPermissionGranted; in PermissionState()
/packages/modules/Permission/tests/cts/permissionpolicy/src/android/permissionpolicy/cts/
DRestrictedPermissionsTest.java23 import static android.permission.cts.PermissionUtils.isPermissionGranted;
558 if (isPermissionGranted(PKG, Manifest.permission.ACCESS_FINE_LOCATION)) { in assertRestrictedPermissionWhitelisted()
560 && isPermissionGranted(PKG, permission)) { in assertRestrictedPermissionWhitelisted()
575 if (!isPermissionGranted(PKG, permission)) { in assertRestrictedPermissionWhitelisted()
DRestrictedStoragePermissionTest.java20 import static android.permission.cts.PermissionUtils.isPermissionGranted;
299 assertThat(isPermissionGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)) in cannotGrantStorageTargetingSdk22NotWhitelisted()
315 assertThat(isPermissionGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)) in cannotGrantStorageTargetingSdk22OptInNotWhitelisted()
/packages/modules/AdServices/sdksandbox/tests/cts/endtoendtests/providers/CtsProvider/src/com/android/ctssdkprovider/
DICtsSdkProviderApi.aidl25 boolean isPermissionGranted (String permissionName, boolean useApplicationContext); in isPermissionGranted() method
DCtsSdkProviderApiImpl.java144 public boolean isPermissionGranted(String permissionName, boolean useApplicationContext) { in isPermissionGranted() method in CtsSdkProviderApiImpl
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/v34/
DSafetyLabelChangesJobService.kt442 .filter { (_, appPermGroupUiInfo) -> appPermGroupUiInfo.isPermissionGranted() } in <lambda>()
445 private fun AppPermGroupUiInfo.isPermissionGranted() = in <lambda>() method in com.android.permissioncontroller.permission.service.v34.SafetyLabelChangesJobService
522 appPermGroupUiInfo.isPermissionGranted() in <lambda>()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/request/
DRequestPermissionViewModel.kt402 val isPermissionGranted = grantedPermissions.contains(permission.toString()) in <lambda>() constant
403 if (isPermissionGranted) { in <lambda>()
/packages/modules/AdServices/sdksandbox/tests/cts/endtoendtests/src/com/android/tests/sdksandbox/endtoend/
DCustomizedSdkContextTest.java102 boolean result = mSdk.isPermissionGranted(permissionName, useApplicationContext); in testSdkPermissions()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/
DHealthConnectServiceImpl.java2503 return isPermissionGranted(MANAGE_HEALTH_DATA_PERMISSION, uid, pid); in hasDataManagementPermission()
2508 && isPermissionGranted(READ_HEALTH_DATA_HISTORY, uid, pid); in hasReadHistoryPermission()
2518 || !isPermissionGranted(READ_HEALTH_DATA_IN_BACKGROUND, uid, pid); in isOnlySelfReadInBackgroundAllowed()
2521 private boolean isPermissionGranted(String permission, int uid, int pid) { in isPermissionGranted() method in HealthConnectServiceImpl

12