Home
last modified time | relevance | path

Searched refs:permission (Results 1 – 25 of 966) sorted by relevance

12345678910>>...39

/cts/tools/release-parser/tests/resources/
Dplatform.xml.pb.txt62 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/hostsidetests/appsecurity/src/android/appsecurity/cts/
DPackageSetInstallerTest.kt87 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/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/
DPermissionUtils.java19 import static android.Manifest.permission.BODY_SENSORS;
20 import static android.Manifest.permission.CAMERA;
21 import static android.Manifest.permission.RECORD_AUDIO;
64 LOCATION_PERMISSIONS.add(Manifest.permission.ACCESS_FINE_LOCATION);
65 LOCATION_PERMISSIONS.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
66 LOCATION_PERMISSIONS.add(Manifest.permission.ACCESS_COARSE_LOCATION);
76 String permission, int expected, String packageName, String activityName) in launchActivityAndCheckPermission() argument
78 launchActivityWithAction(permission, ACTION_CHECK_HAS_PERMISSION, in launchActivityAndCheckPermission()
93 String permission, int expected, String packageName, String activityName) in launchActivityAndRequestPermission() argument
95 launchActivityWithAction(permission, ACTION_REQUEST_PERMISSION, in launchActivityAndRequestPermission()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DPermissionsTest.java18 import static android.Manifest.permission.READ_CONTACTS;
19 import static android.Manifest.permission.WRITE_CONTACTS;
34 import android.Manifest.permission;
86 permission.ACCESS_FINE_LOCATION,
87 permission.ACCESS_BACKGROUND_LOCATION,
88 permission.ACCESS_COARSE_LOCATION);
91 permission.ACCESS_FINE_LOCATION,
92 permission.ACCESS_COARSE_LOCATION,
93 permission.CAMERA,
94 permission.ACTIVITY_RECOGNITION,
[all …]
/cts/tests/tests/content/BinderPermissionTestService/src/com/android/cts/
DBinderPermissionTestService.java36 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/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DSessionParamsPermissionStateTest.kt28 import android.permission.PermissionManager in <lambda>()
57 .getPermissionInfo(Manifest.permission.USE_FULL_SCREEN_INTENT, 0) in <lambda>()
67 Manifest.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS in <lambda>()
78 finalPermissionState = mapOf(Manifest.permission.USE_FULL_SCREEN_INTENT to true) in <lambda>()
81 Manifest.permission.USE_FULL_SCREEN_INTENT, in <lambda>()
89 finalPermissionState = mapOf(Manifest.permission.USE_FULL_SCREEN_INTENT to false) in <lambda>()
92 Manifest.permission.USE_FULL_SCREEN_INTENT, in <lambda>()
101 Manifest.permission.USE_FULL_SCREEN_INTENT to isFsiDefaultGranted, in <lambda>()
105 Manifest.permission.USE_FULL_SCREEN_INTENT, in <lambda>()
120 finalPermissionState = mapOf(Manifest.permission.USE_FULL_SCREEN_INTENT to null) in <lambda>()
[all …]
/cts/common/device-side/bedstead/modules/permissions/src/main/kotlin/com/android/bedstead/permissions/
DPermissionsAnnotationExecutor.kt53 for (permission in annotation.value) { in applyAnnotation() method
54 ensureCanGetPermission(permission) in applyAnnotation()
88 for (permission: String in annotation.value) { in applyAnnotation() method
89 ensureCanGetPermission(permission) in applyAnnotation()
137 private fun withPermission(vararg permission: String) { in withPermission()
138 permissionContext = permissionContext?.withPermission(*permission) in withPermission()
139 ?: permissions().withPermission(*permission) in withPermission()
142 private fun withoutPermission(vararg permission: String) { in withoutPermission()
144 permissionContext = permissionContext?.withoutPermission(*permission) in withoutPermission()
145 ?: permissions().withoutPermission(*permission) in withoutPermission()
[all …]
DPermissions.java416 for (String permission : permissionContext.grantedPermissions()) {
417 grantedPermissions.add(permission);
418 deniedPermissions.remove(permission);
421 for (String permission : permissionContext.deniedPermissions()) {
422 grantedPermissions.remove(permission);
423 deniedPermissions.add(permission);
466 String message, String permission) {
470 permission, /* flags= */ 0).protectionLevel);
487 + permission
491 + sContext.checkSelfPermission(permission)
[all …]
/cts/tests/tests/security/
DAndroid.bp39 "permission-test-util-lib",
114 certificate: ":permission-test-cert-1",
123 certificate: ":permission-test-cert-1",
132 certificate: ":permission-test-cert-2",
141 certificate: ":permission-test-cert-3",
150 certificate: ":permission-test-cert-4",
159 certificate: ":permission-test-cert-1",
161 ":permission-test-cert-2",
171 certificate: ":permission-test-cert-1",
173 ":permission-test-cert-2",
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBaseDefaultPermissionGrantPolicyTest.java37 import android.permission.PermissionManager;
121 && runtimePermNames.contains(Manifest.permission.POST_NOTIFICATIONS)) { in testDefaultGrantsWithRemoteExceptions()
122 addImplicitlyGrantedPermission(Manifest.permission.POST_NOTIFICATIONS, in testDefaultGrantsWithRemoteExceptions()
265 String permission, String message) { in addViolation() argument
274 violations.get(packageName).get(message).add(permission); in addViolation()
389 String permission = entry.getKey(); in addException() local
391 if (!requestedPermissions.contains(permission)) { in addException()
392 Log.w(LOG_TAG, "Permission " + permission + " not requested by: " + packageName); in addException()
395 if (!runtimePermNames.contains(permission)) { in addException()
396 Log.w(LOG_TAG, "Permission:" + permission + " in not runtime"); in addException()
[all …]
DPermissionUtils.java70 @NonNull String permission) throws Exception { in isPermissionAndAppOpGranted() argument
71 if (!isPermissionGranted(packageName, permission)) { in isPermissionAndAppOpGranted()
74 return getAppOp(packageName, permission) != MODE_IGNORED; in isPermissionAndAppOpGranted()
87 @NonNull String permission) { in grantPermissionAndAppOp() argument
88 sUiAutomation.grantRuntimePermission(packageName, permission); in grantPermissionAndAppOp()
90 setAppOpByPermission(packageName, permission, MODE_ALLOWED); in grantPermissionAndAppOp()
103 @NonNull String permission) { in revokePermissionAndAppOp() argument
104 sUiAutomation.revokeRuntimePermission(packageName, permission); in revokePermissionAndAppOp()
106 setAppOpByPermission(packageName, permission, MODE_IGNORED); in revokePermissionAndAppOp()
138 private static int getAppOp(@NonNull String packageName, @NonNull String permission) in getAppOp() argument
[all …]
/cts/tests/tests/content/BinderPermissionTestService/aidl/com/android/cts/
DIBinderPermissionTestService.aidl21 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/telephony/current/src/android/telephony/cts/
DTelephonyLocationTests.java91 cellLocationAccess, Manifest.permission.ACCESS_FINE_LOCATION); in testCellLocationFinePermission()
93 Manifest.permission.ACCESS_BACKGROUND_LOCATION); in testCellLocationFinePermission()
108 Manifest.permission.ACCESS_COARSE_LOCATION); in testServiceStateLocationSanitization()
110 Manifest.permission.ACCESS_FINE_LOCATION); in testServiceStateLocationSanitization()
117 Manifest.permission.ACCESS_BACKGROUND_LOCATION); in testServiceStateLocationSanitization()
124 new HashSet<>(Arrays.asList(android.Manifest.permission.ACCESS_FINE_LOCATION)); in testServiceStateLocationSanitizationWithRenouncedPermission()
131 permissionsToRenounce.add(android.Manifest.permission.ACCESS_COARSE_LOCATION); in testServiceStateLocationSanitizationWithRenouncedPermission()
140 new HashSet<>(Arrays.asList(android.Manifest.permission.ACCESS_FINE_LOCATION)); in testServiceStateListeningWithRenouncedPermission()
145 permissionsToRenounce.add(android.Manifest.permission.ACCESS_COARSE_LOCATION); in testServiceStateListeningWithRenouncedPermission()
164 Manifest.permission.ACCESS_COARSE_LOCATION); in testServiceStateListeningWithoutPermissions()
[all …]
/cts/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/src/com/android/cts/escalatepermission/
DPermissionEscalationTest.java28 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/security/src/android/security/cts/
DSplitPermissionAutoGrantTest.kt44 assertAppHasPermission(android.Manifest.permission.BLUETOOTH, true) in testAutoGrant()
45 assertAppHasPermission(android.Manifest.permission.BLUETOOTH_CONNECT, true) in testAutoGrant()
46 assertAppHasPermission(android.Manifest.permission.BLUETOOTH_ADVERTISE, true) in testAutoGrant()
47 assertAppHasPermission(android.Manifest.permission.BLUETOOTH_SCAN, false) in testAutoGrant()
50 android.Manifest.permission.BLUETOOTH_SCAN to false) { in testAutoGrant()
55 android.Manifest.permission.BLUETOOTH_SCAN to true) { in testAutoGrant()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DPermissionGrantTest.java187 public void denyPermission_setsGrantState(@DeniablePermissionTestParameter String permission) { in denyPermission_setsGrantState() argument
190 sTestApp.packageName(), permission); in denyPermission_setsGrantState()
195 permission, PERMISSION_GRANT_STATE_DENIED); in denyPermission_setsGrantState()
202 permission)) in denyPermission_setsGrantState()
207 permission, existingGrantState); in denyPermission_setsGrantState() local
240 @DeniablePermissionTestParameter String permission) { in denyPermission_permissionIsDenied()
243 sTestApp.packageName(), permission); in denyPermission_permissionIsDenied()
245 sTestApp.pkg().grantPermission(TestApis.users().instrumented(), permission); in denyPermission_permissionIsDenied() local
248 permission, PERMISSION_GRANT_STATE_DENIED); in denyPermission_permissionIsDenied() local
251 sTestApp.pkg().hasPermission(permission)).isFalse(); in denyPermission_permissionIsDenied()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DLowPowerStandbyTest.java115 Manifest.permission.MANAGE_LOW_POWER_STANDBY)) { in setUp()
128 Manifest.permission.MANAGE_LOW_POWER_STANDBY)) { in tearDown()
157 @EnsureHasPermission(Manifest.permission.MANAGE_LOW_POWER_STANDBY)
166 @EnsureHasPermission(Manifest.permission.MANAGE_LOW_POWER_STANDBY)
178 @EnsureHasPermission(Manifest.permission.MANAGE_LOW_POWER_STANDBY)
200 @EnsureHasPermission({Manifest.permission.MANAGE_LOW_POWER_STANDBY,
201 Manifest.permission.DEVICE_POWER})
225 @EnsureHasPermission({Manifest.permission.MANAGE_LOW_POWER_STANDBY,
226 Manifest.permission.DEVICE_POWER})
269 @EnsureHasPermission({Manifest.permission.MANAGE_LOW_POWER_STANDBY,
[all …]
/cts/apps/hotspot/src/com/android/cts/hotspot/
DMainActivity.java14 if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) in onCreate()
17 this, new String[] {Manifest.permission.ACCESS_COARSE_LOCATION}, 2); in onCreate()
20 if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) in onCreate()
23 this, new String[] {Manifest.permission.ACCESS_FINE_LOCATION}, 2); in onCreate()
/cts/tests/tests/companion/common/src/android/companion/cts/common/
DConstants.kt36 DEVICE_PROFILE_WATCH to Manifest.permission.REQUEST_COMPANION_PROFILE_WATCH,
38 Manifest.permission.REQUEST_COMPANION_PROFILE_APP_STREAMING,
40 Manifest.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION,
42 Manifest.permission.REQUEST_COMPANION_PROFILE_GLASSES,
44 Manifest.permission.REQUEST_COMPANION_PROFILE_NEARBY_DEVICE_STREAMING,
46 Manifest.permission.REQUEST_COMPANION_PROFILE_COMPUTER
/cts/common/device-side/bedstead/modules/enterprise/src/main/kotlin/com/android/bedstead/enterprise/
DAnnotationLogicExtensions.kt52 val permission = arrayOf(policies[0].permissions[0].appliedWith) in logic() constant
56 permission, in logic()
63 permission, in logic()
77 val permission = arrayOf(policies[0].permissions[0].appliedWith) in MostRestrictiveCoexistenceTest() constant
81 permission, in MostRestrictiveCoexistenceTest()
88 permission, in MostRestrictiveCoexistenceTest()
/cts/tests/tests/companion/core/src/android/companion/cts/core/
DTransportsListenerTest.kt61 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
73 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
92 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
104 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
123 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
135 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
146 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
173 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
178 withShellPermissionIdentity(Manifest.permission.USE_COMPANION_TRANSPORTS) { in <lambda>()
/cts/hostsidetests/media/app/MediaRouterWithModifyAudioRoutingApp/src/android/media/router/cts/modifyaudioroutingapp/
DMediaRouter2DeviceTestWithModifyAudioRouting.java75 .adoptShellPermissionIdentity(Manifest.permission.MODIFY_AUDIO_ROUTING); in setUp()
80 assertThat(mContext.checkCallingOrSelfPermission(Manifest.permission.MODIFY_AUDIO_ROUTING)) in getSystemController_withModifyAudioRouting_returnsDeviceRoute()
83 assertThat(mContext.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH_SCAN)) in getSystemController_withModifyAudioRouting_returnsDeviceRoute()
85 assertThat(mContext.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH_CONNECT)) in getSystemController_withModifyAudioRouting_returnsDeviceRoute()
98 assertThat(mContext.checkCallingOrSelfPermission(Manifest.permission.MODIFY_AUDIO_ROUTING)) in getRoutes_withModifyAudioRouting_returnsDeviceRoute()
101 assertThat(mContext.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH_SCAN)) in getRoutes_withModifyAudioRouting_returnsDeviceRoute()
103 assertThat(mContext.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH_CONNECT)) in getRoutes_withModifyAudioRouting_returnsDeviceRoute()
/cts/common/device-side/bedstead/queryable/src/main/java/com/android/queryable/info/
DActivityInfo.java55 .permission(activityInfo.permission); in builder()
59 Set<IntentFilter> intentFilters, String permission) { in ActivityInfo() argument
67 mPermission = permission; in ActivityInfo()
84 public String permission() { in permission() method in ActivityInfo
134 public Builder permission(String permission) { in permission() argument
135 mPermission = permission; in permission()
/cts/tests/backup/src/android/backup/cts/
DPermissionTest.java19 import static android.Manifest.permission.ACCESS_BACKGROUND_LOCATION;
20 import static android.Manifest.permission.ACCESS_FINE_LOCATION;
21 import static android.Manifest.permission.READ_CONTACTS;
22 import static android.Manifest.permission.WRITE_CONTACTS;
32 import static android.permission.cts.PermissionUtils.grantPermission;
403 private void setFlag(String app, String permission, int flag) { in setFlag() argument
405 () -> sContext.getPackageManager().updatePermissionFlags(permission, app, in setFlag()
409 private void clearFlag(String app, String permission, int flag) { in clearFlag() argument
411 () -> sContext.getPackageManager().updatePermissionFlags(permission, app, in clearFlag()
415 private boolean isFlagSet(String app, String permission, int flag) { in isFlagSet() argument
[all …]
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DBluetoothLeScanTest.java92 .adoptShellPermissionIdentity(android.Manifest.permission.BLUETOOTH_CONNECT); in setUp()
105 "android.bluetooth.cts", android.Manifest.permission.ACCESS_FINE_LOCATION); in setUp()
125 .adoptShellPermissionIdentity(android.Manifest.permission.BLUETOOTH_SCAN); in basicBleScan()
144 android.Manifest.permission.BLUETOOTH_CONNECT, in scanFilter()
145 android.Manifest.permission.BLUETOOTH_SCAN); in scanFilter()
173 android.Manifest.permission.BLUETOOTH_CONNECT, in scanFromSourceWithoutFilters()
174 android.Manifest.permission.BLUETOOTH_PRIVILEGED, in scanFromSourceWithoutFilters()
175 android.Manifest.permission.BLUETOOTH_SCAN, in scanFromSourceWithoutFilters()
176 android.Manifest.permission.UPDATE_DEVICE_STATS in scanFromSourceWithoutFilters()
195 android.Manifest.permission.BLUETOOTH_CONNECT, in scanFromSourceWithFilters()
[all …]

12345678910>>...39