/cts/tests/tests/permission3/src/android/permission3/cts/ |
D | PermissionUpgradeTest.kt | 44 android.Manifest.permission.SEND_SMS, in assertAllPermissionsGrantedByDefault() 45 android.Manifest.permission.RECEIVE_SMS, in assertAllPermissionsGrantedByDefault() 47 android.Manifest.permission.WRITE_CONTACTS, in assertAllPermissionsGrantedByDefault() 48 android.Manifest.permission.READ_CALENDAR, in assertAllPermissionsGrantedByDefault() 49 android.Manifest.permission.WRITE_CALENDAR, in assertAllPermissionsGrantedByDefault() 50 android.Manifest.permission.READ_SMS, in assertAllPermissionsGrantedByDefault() 51 android.Manifest.permission.RECEIVE_WAP_PUSH, in assertAllPermissionsGrantedByDefault() 52 android.Manifest.permission.RECEIVE_MMS, in assertAllPermissionsGrantedByDefault() 54 android.Manifest.permission.READ_EXTERNAL_STORAGE, in assertAllPermissionsGrantedByDefault() 55 android.Manifest.permission.WRITE_EXTERNAL_STORAGE, in assertAllPermissionsGrantedByDefault() [all …]
|
D | PermissionTest23.kt | 47 grantAppPermissions(android.Manifest.permission.READ_CALENDAR) in testGranted() 50 assertAppHasPermission(android.Manifest.permission.READ_CALENDAR, true) in testGranted() 51 assertAppHasPermission(android.Manifest.permission.WRITE_CALENDAR, true) in testGranted() 58 assertAppHasPermission(android.Manifest.permission.READ_CALENDAR, false) in testInteractiveGrant() 59 assertAppHasPermission(android.Manifest.permission.WRITE_CALENDAR, false) in testInteractiveGrant() 64 android.Manifest.permission.READ_CALENDAR to true, in testInteractiveGrant() 65 android.Manifest.permission.WRITE_CALENDAR to true in testInteractiveGrant() 77 assertAppHasPermission(android.Manifest.permission.READ_CONTACTS, false) in testRuntimeGroupGrantSpecificity() 78 assertAppHasPermission(android.Manifest.permission.WRITE_CONTACTS, false) in testRuntimeGroupGrantSpecificity() 82 requestAppPermissionsAndAssertResult(android.Manifest.permission.WRITE_CONTACTS to true) { in testRuntimeGroupGrantSpecificity() [all …]
|
D | PermissionGroupTest.kt | 54 assertAppHasPermission(android.Manifest.permission.RECEIVE_SMS, false) in testPartiallyGrantedGroupExpansion() 55 assertAppHasPermission(android.Manifest.permission.SEND_SMS, false) in testPartiallyGrantedGroupExpansion() 59 android.Manifest.permission.RECEIVE_SMS) in testPartiallyGrantedGroupExpansion() 60 assertAppHasPermission(android.Manifest.permission.RECEIVE_SMS, true) in testPartiallyGrantedGroupExpansion() 63 requestAppPermissionsAndAssertResult(android.Manifest.permission.RECEIVE_SMS to true, in testPartiallyGrantedGroupExpansion() 64 android.Manifest.permission.SEND_SMS to true) { } in testPartiallyGrantedGroupExpansion() 66 assertAppHasPermission(android.Manifest.permission.SEND_SMS, true) in testPartiallyGrantedGroupExpansion() 71 assertAppHasPermission(android.Manifest.permission.RECEIVE_SMS, false) in testRuntimeGroupGrantExpansion() 72 assertAppHasPermission(android.Manifest.permission.SEND_SMS, false) in testRuntimeGroupGrantExpansion() 76 requestAppPermissionsAndAssertResult(android.Manifest.permission.RECEIVE_SMS to true) { in testRuntimeGroupGrantExpansion() [all …]
|
D | BaseUsePermissionTest.kt | 109 android.Manifest.permission.READ_CONTACTS in <lambda>() 111 android.Manifest.permission.WRITE_CONTACTS in <lambda>() 114 android.Manifest.permission.READ_CALENDAR in <lambda>() 116 android.Manifest.permission.WRITE_CALENDAR in <lambda>() 119 android.Manifest.permission.SEND_SMS to "@android:string/permgrouplab_sms", in <lambda>() 120 android.Manifest.permission.RECEIVE_SMS to "@android:string/permgrouplab_sms", in <lambda>() 121 android.Manifest.permission.READ_SMS to "@android:string/permgrouplab_sms", in <lambda>() 122 android.Manifest.permission.RECEIVE_WAP_PUSH to "@android:string/permgrouplab_sms", in <lambda>() 123 android.Manifest.permission.RECEIVE_MMS to "@android:string/permgrouplab_sms", in <lambda>() 126 android.Manifest.permission.READ_EXTERNAL_STORAGE in <lambda>() [all …]
|
D | PermissionTest22.kt | 39 assertAppHasPermission(android.Manifest.permission.READ_CALENDAR, true) in testCompatDefault() 40 assertAppHasPermission(android.Manifest.permission.WRITE_CALENDAR, true) in testCompatDefault() 47 revokeAppPermissions(android.Manifest.permission.WRITE_CALENDAR, isLegacyApp = true) in testCompatRevoked() 50 assertAppHasPermission(android.Manifest.permission.READ_CALENDAR, true) in testCompatRevoked() 51 assertAppHasPermission(android.Manifest.permission.WRITE_CALENDAR, true) in testCompatRevoked() 61 arrayOf(android.Manifest.permission.SEND_SMS), emptyArray() in testNoRuntimePrompt()
|
/cts/tests/tests/permission2/src/android/permission2/cts/ |
D | RuntimePermissionProperties.kt | 19 import android.Manifest.permission.ACCEPT_HANDOVER 20 import android.Manifest.permission.ACCESS_COARSE_LOCATION 21 import android.Manifest.permission.ACCESS_FINE_LOCATION 22 import android.Manifest.permission.ACTIVITY_RECOGNITION 23 import android.Manifest.permission.ADD_VOICEMAIL 24 import android.Manifest.permission.ANSWER_PHONE_CALLS 25 import android.Manifest.permission.BLUETOOTH_ADVERTISE 26 import android.Manifest.permission.BLUETOOTH_CONNECT 27 import android.Manifest.permission.BLUETOOTH_SCAN 28 import android.Manifest.permission.BODY_SENSORS [all …]
|
D | RestrictedStoragePermissionTest.java | 19 import static android.permission.cts.PermissionUtils.isGranted; 20 import static android.permission.cts.PermissionUtils.isPermissionGranted; 30 import android.Manifest.permission; 294 assertThat(isGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)).isFalse(); in cannotGrantStorageTargetingSdk22NotWhitelisted() 297 assertThat(isPermissionGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)) in cannotGrantStorageTargetingSdk22NotWhitelisted() 310 assertThat(isGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)).isFalse(); in cannotGrantStorageTargetingSdk22OptInNotWhitelisted() 313 assertThat(isPermissionGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)) in cannotGrantStorageTargetingSdk22OptInNotWhitelisted() 326 assertThat(isGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)).isTrue()); in canGrantStorageTargetingSdk22Whitelisted() 337 assertThat(isGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)).isTrue()); in canGrantStorageTargetingSdk22OptInWhitelisted() 348 assertThat(isGranted(PKG, Manifest.permission.READ_EXTERNAL_STORAGE)).isFalse()); in cannotGrantStorageTargetingSdk28NotWhitelisted() [all …]
|
D | RestrictedPermissionsTest.java | 19 import static android.Manifest.permission.ACCESS_BACKGROUND_LOCATION; 20 import static android.Manifest.permission.ACCESS_FINE_LOCATION; 21 import static android.Manifest.permission.READ_SMS; 22 import static android.permission.cts.PermissionUtils.isGranted; 23 import static android.permission.cts.PermissionUtils.isPermissionGranted; 34 import android.Manifest.permission; 148 whitelistedPermissions.add(Manifest.permission.SEND_SMS); in testSomeRestrictedPermissionsWhitelistedAtInstall29() 149 whitelistedPermissions.add(Manifest.permission.READ_CALL_LOG); in testSomeRestrictedPermissionsWhitelistedAtInstall29() 193 whitelistedPermissions.add(Manifest.permission.SEND_SMS); in testSomeRestrictedPermissionsWhitelistedAtInstall22() 194 whitelistedPermissions.add(Manifest.permission.READ_CALL_LOG); in testSomeRestrictedPermissionsWhitelistedAtInstall22() [all …]
|
/cts/tools/release-parser/tests/resources/ |
D | platform.xml.pb.txt | 62 key: "permission" 64 name: "permission" 66 name: "android.permission.BLUETOOTH_ADMIN" 73 name: "android.permission.BLUETOOTH" 80 name: "android.permission.BLUETOOTH_STACK" 95 name: "android.permission.NET_TUNNELING" 102 name: "android.permission.INTERNET" 109 name: "android.permission.READ_LOGS" 116 name: "android.permission.WRITE_MEDIA_STORAGE" 123 name: "android.permission.ACCESS_MTP" [all …]
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/permissions/ |
D | Permissions.java | 234 for (String permission : permissionContext.grantedPermissions()) { in applyPermissions() 235 grantedPermissions.add(permission); in applyPermissions() 236 deniedPermissions.remove(permission); in applyPermissions() 239 for (String permission : permissionContext.deniedPermissions()) { in applyPermissions() 240 grantedPermissions.remove(permission); in applyPermissions() 241 deniedPermissions.add(permission); in applyPermissions() 252 for (String permission : grantedPermissions) { in applyPermissions() 253 checkCanGrantOnAllSupportedVersions(permission, sUser); in applyPermissions() 255 Log.d(LOG_TAG, "Trying to grant " + permission); in applyPermissions() 256 if (sInstrumentedPackage.hasPermission(sUser, permission)) { in applyPermissions() [all …]
|
/cts/tests/tests/permission/src/android/permission/cts/ |
D | ServicePermissionTest.java | 17 package android.permission.cts; 38 android.Manifest.permission.ACCOUNT_MANAGER, 39 android.Manifest.permission.BIND_ACCESSIBILITY_SERVICE, 40 android.Manifest.permission.BIND_AUTOFILL_SERVICE, 41 android.Manifest.permission.BIND_CHOOSER_TARGET_SERVICE, 42 android.Manifest.permission.BIND_CONDITION_PROVIDER_SERVICE, 44 android.Manifest.permission.BIND_DREAM_SERVICE, 45 android.Manifest.permission.BIND_INPUT_METHOD, 46 android.Manifest.permission.BIND_MIDI_DEVICE_SERVICE, 48 android.Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE, [all …]
|
D | SplitPermissionsSystemTest.java | 17 package android.permission.cts; 19 import static android.Manifest.permission.ACCESS_BACKGROUND_LOCATION; 20 import static android.Manifest.permission.ACCESS_COARSE_LOCATION; 21 import static android.Manifest.permission.ACCESS_FINE_LOCATION; 22 import static android.Manifest.permission.ACCESS_MEDIA_LOCATION; 23 import static android.Manifest.permission.BLUETOOTH; 24 import static android.Manifest.permission.BLUETOOTH_ADMIN; 25 import static android.Manifest.permission.BLUETOOTH_CONNECT; 26 import static android.Manifest.permission.BLUETOOTH_SCAN; 27 import static android.Manifest.permission.READ_CALL_LOG; [all …]
|
D | RevokePermissionTest.kt | 17 package android.permission.cts 19 import android.Manifest.permission.CAMERA 20 import android.Manifest.permission.READ_CALENDAR 49 permission = READ_CALENDAR, in testRevokePermission() 58 permission = CAMERA, in testRevokePermissionNotRequested() 69 permission = fakePermissionName, in testRevokeFakePermission() 81 permission = READ_CALENDAR) in testRevokeFakePackage() 89 permission = READ_CALENDAR, in testRevokePermissionWithReason() 99 permission = CAMERA, in testRevokePermissionNotRequestedWithReason() 111 permission = fakePermissionName, in testRevokeFakePermissionWithReason() [all …]
|
D | BackgroundPermissionsTest.java | 17 package android.permission.cts; 19 import static android.Manifest.permission.ACCESS_BACKGROUND_LOCATION; 20 import static android.Manifest.permission.ACCESS_COARSE_LOCATION; 21 import static android.Manifest.permission.ACCESS_FINE_LOCATION; 27 import static android.permission.cts.PermissionUtils.getAppOp; 28 import static android.permission.cts.PermissionUtils.grantPermission; 29 import static android.permission.cts.PermissionUtils.install; 30 import static android.permission.cts.PermissionUtils.uninstallApp; 89 PermissionInfo permission = pkg.permissions[i]; in verifybackgroundPermissionsProperties() local 92 if ((permission.getProtection() & PROTECTION_DANGEROUS) != 0 in verifybackgroundPermissionsProperties() [all …]
|
/cts/tests/tests/permission/permissionTestUtilLib/src/android/permission/cts/ |
D | PermissionUtils.java | 17 package android.permission.cts; 19 import static android.Manifest.permission.ACCESS_BACKGROUND_LOCATION; 20 import static android.Manifest.permission.ACCESS_COARSE_LOCATION; 21 import static android.Manifest.permission.PACKAGE_USAGE_STATS; 84 public static int getAppOp(@NonNull String packageName, @NonNull String permission) in getAppOp() argument 87 permissionToOp(permission), in getAppOp() 121 public static void setAppOp(@NonNull String packageName, @NonNull String permission, int mode) { in setAppOp() argument 122 setAppOpByName(packageName, permissionToOp(permission), mode); in setAppOp() 150 @NonNull String permission) throws Exception { in isPermissionGranted() argument 151 return sContext.checkPermission(permission, Process.myPid(), in isPermissionGranted() [all …]
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | PackageSetInstallerTest.kt | 87 permission = PERMISSION_NOT_RESTRICTED, in notRestricted() 94 permission = PERMISSION_HARD_RESTRICTED, in hardRestricted() 101 permission = PERMISSION_IMMUTABLY_SOFT_RESTRICTED, in immutablySoftRestrictedGranted() 108 permission = PERMISSION_IMMUTABLY_SOFT_RESTRICTED, in immutablySoftRestrictedRevoked() 115 permission: String, in runTest() 121 PERMISSION_KEY to permission in runTest() 144 assertPermission(false, permission) in runTest() 156 grantPermission(permission) in runTest() 157 assertPermission(true, permission) in runTest() 158 revokePermission(permission) in runTest() [all …]
|
/cts/tests/tests/content/BinderPermissionTestService/src/com/android/cts/ |
D | BinderPermissionTestService.java | 36 public void doEnforceCallingPermission(String permission) { 37 enforceCallingPermission(permission, TEST_NOT_ALLOWED_MESSAGE); 41 public int doCheckCallingPermission(String permission) { 42 return checkCallingPermission(permission); 46 public void doEnforceCallingOrSelfPermission(String permission) { 47 enforceCallingOrSelfPermission(permission, TEST_NOT_ALLOWED_MESSAGE); 51 public int doCheckCallingOrSelfPermission(String permission) { 52 return checkCallingOrSelfPermission(permission);
|
/cts/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/ |
D | PermissionUtils.java | 19 import static android.Manifest.permission.CAMERA; 20 import static android.Manifest.permission.RECORD_AUDIO; 63 LOCATION_PERMISSIONS.add(Manifest.permission.ACCESS_FINE_LOCATION); 64 LOCATION_PERMISSIONS.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION); 65 LOCATION_PERMISSIONS.add(Manifest.permission.ACCESS_COARSE_LOCATION); 75 String permission, int expected, String packageName, String activityName) in launchActivityAndCheckPermission() argument 77 launchActivityWithAction(permission, ACTION_CHECK_HAS_PERMISSION, in launchActivityAndCheckPermission() 92 String permission, int expected, String packageName, String activityName) in launchActivityAndRequestPermission() argument 94 launchActivityWithAction(permission, ACTION_REQUEST_PERMISSION, in launchActivityAndRequestPermission() 100 receiver, UiDevice device, String permission, int expected, in launchActivityAndRequestPermission() argument [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | PermissionsTest.java | 18 import static android.Manifest.permission.READ_CONTACTS; 19 import static android.Manifest.permission.WRITE_CONTACTS; 34 import android.Manifest.permission; 80 permission.ACCESS_FINE_LOCATION, 81 permission.ACCESS_BACKGROUND_LOCATION, 82 permission.ACCESS_COARSE_LOCATION); 85 permission.ACCESS_FINE_LOCATION, 86 permission.ACCESS_COARSE_LOCATION, 87 permission.CAMERA, 88 permission.ACTIVITY_RECOGNITION, [all …]
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | PermissionGrantTest.java | 19 import static android.Manifest.permission.ACCESS_BACKGROUND_LOCATION; 20 import static android.Manifest.permission.ACCESS_COARSE_LOCATION; 21 import static android.Manifest.permission.ACCESS_FINE_LOCATION; 22 import static android.Manifest.permission.ACTIVITY_RECOGNITION; 23 import static android.Manifest.permission.BODY_SENSORS; 24 import static android.Manifest.permission.CAMERA; 25 import static android.Manifest.permission.INTERACT_ACROSS_USERS; 26 import static android.Manifest.permission.READ_CALENDAR; 27 import static android.Manifest.permission.READ_CONTACTS; 28 import static android.Manifest.permission.READ_SMS; [all …]
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | BaseDefaultPermissionGrantPolicyTest.java | 34 import android.permission.PermissionManager; 254 String permission, String message) { in addViolation() argument 263 violations.get(packageName).get(message).add(permission); in addViolation() 376 String permission = entry.getKey(); in addException() local 378 if (!requestedPermissions.contains(permission)) { in addException() 379 Log.w(LOG_TAG, "Permission " + permission + " not requested by: " + packageName); in addException() 382 if (!runtimePermNames.contains(permission)) { in addException() 383 Log.w(LOG_TAG, "Permission:" + permission + " in not runtime"); in addException() 393 for (String extendedPerm : extendBySplitPermissions(permission, in addException() 396 permission.equals(extendedPerm) ? "exception" in addException() [all …]
|
/cts/tests/tests/content/BinderPermissionTestService/aidl/com/android/cts/ |
D | IBinderPermissionTestService.aidl | 21 void doEnforceCallingPermission(String permission); in doEnforceCallingPermission() argument 22 int doCheckCallingPermission(String permission); in doCheckCallingPermission() argument 23 void doEnforceCallingOrSelfPermission(String permission); in doEnforceCallingOrSelfPermission() argument 24 int doCheckCallingOrSelfPermission(String permission); in doCheckCallingOrSelfPermission() argument
|
/cts/tests/tests/os/ |
D | OWNERS | 1 per-file *AutoRevoke* = file:platform/frameworks/base:/core/java/android/permission/OWNERS 2 per-file *AppHibernation* = file:platform/frameworks/base:/core/java/android/permission/OWNERS 3 per-file *Companion* = file:platform/frameworks/base:/core/java/android/permission/OWNERS 4 per-file *AndroidManifest.xml = file:platform/frameworks/base:/core/java/android/permission/OWNERS 5 per-file *CtsOsTestCases.xml = file:platform/frameworks/base:/core/java/android/permission/OWNERS
|
/cts/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/src/com/android/cts/escalatepermission/ |
D | PermissionEscalationTest.java | 28 import com.android.cts.escalate.permission.Manifest; 41 .getPermissionInfo(Manifest.permission.STEAL_AUDIO1, 0); in testCannotEscalateNonRuntimePermissionsToRuntime() 48 .getPermissionInfo(Manifest.permission.STEAL_AUDIO2, 0); in testCannotEscalateNonRuntimePermissionsToRuntime() 62 .getPermissionInfo(Manifest.permission.STEAL_AUDIO1, 0); in testRuntimePermissionsAreNotGranted() 68 context.checkSelfPermission(Manifest.permission.STEAL_AUDIO1), in testRuntimePermissionsAreNotGranted() 73 .getPermissionInfo(Manifest.permission.STEAL_AUDIO2, 0); in testRuntimePermissionsAreNotGranted() 79 context.checkSelfPermission(Manifest.permission.STEAL_AUDIO2), in testRuntimePermissionsAreNotGranted()
|
/cts/tests/tests/telephony/current/src/android/telephony/cts/ |
D | TelephonyLocationTests.java | 77 cellLocationAccess, Manifest.permission.ACCESS_FINE_LOCATION); in testCellLocationFinePermission() 79 Manifest.permission.ACCESS_BACKGROUND_LOCATION); in testCellLocationFinePermission() 96 Manifest.permission.ACCESS_COARSE_LOCATION); in testServiceStateLocationSanitization() 98 Manifest.permission.ACCESS_FINE_LOCATION); in testServiceStateLocationSanitization() 105 Manifest.permission.ACCESS_BACKGROUND_LOCATION); in testServiceStateLocationSanitization() 123 Manifest.permission.ACCESS_COARSE_LOCATION); in testServiceStateListeningWithoutPermissions() 125 Manifest.permission.ACCESS_FINE_LOCATION); in testServiceStateListeningWithoutPermissions() 133 Manifest.permission.ACCESS_BACKGROUND_LOCATION); in testServiceStateListeningWithoutPermissions() 153 Manifest.permission.ACCESS_COARSE_LOCATION); in testSdk28ServiceStateListeningWithoutPermissions() 155 Manifest.permission.ACCESS_FINE_LOCATION); in testSdk28ServiceStateListeningWithoutPermissions() [all …]
|