Home
last modified time | relevance | path

Searched refs:permissions (Results 1 – 25 of 4228) sorted by relevance

12345678910>>...170

/cts/tools/release-parser/tests/resources/
Dplatform.xml.pb.txt9 permissions {
12 permissions {
15 permissions {
24 permissions {
31 permissions {
38 permissions {
45 permissions {
52 permissions {
65 permissions {
72 permissions {
[all …]
/cts/common/device-side/bedstead/modules/permissions/src/test/kotlin/com/android/bedstead/permissions/
DPermissionsTest.kt16 package com.android.bedstead.permissions
27 import com.android.bedstead.nene.TestApis.permissions
33 import com.android.bedstead.permissions.CommonPermissions.CREATE_USERS
34 import com.android.bedstead.permissions.CommonPermissions.INTERACT_ACROSS_USERS
35 import com.android.bedstead.permissions.CommonPermissions.MANAGE_USERS
36 import com.android.bedstead.permissions.annotations.EnsureDoesNotHaveAppOp
37 import com.android.bedstead.permissions.annotations.EnsureDoesNotHavePermission
38 import com.android.bedstead.permissions.annotations.EnsureHasAppOp
39 import com.android.bedstead.permissions.annotations.EnsureHasPermission
68 TestApis.permissions().withPermission(PERMISSION_HELD_BY_SHELL).use { in withPermission_shellPermission_permissionIsGranted()
[all …]
DPermissionsAnnotationExecutorTest.kt16 package com.android.bedstead.permissions in <lambda>()
29 import com.android.bedstead.nene.TestApis.permissions in <lambda>()
30 import com.android.bedstead.permissions.annotations.EnsureDoesNotHaveAppOp in <lambda>()
31 import com.android.bedstead.permissions.annotations.EnsureDoesNotHavePermission in <lambda>()
32 import com.android.bedstead.permissions.annotations.EnsureHasAppOp in <lambda>()
33 import com.android.bedstead.permissions.annotations.EnsureHasPermission in <lambda>()
95 assertThat(permissions().hasAppOpAllowed(APP_OP)).isTrue() in <lambda>()
101 assertThat(permissions().hasAppOpAllowed(APP_OP)).isFalse() in <lambda>()
/cts/common/device-side/bedstead/modules/permissions/src/main/kotlin/com/android/bedstead/permissions/
DPermissionContextImpl.java17 package com.android.bedstead.permissions;
37 PermissionContextImpl(Permissions permissions) { in PermissionContextImpl() argument
38 mPermissions = permissions; in PermissionContextImpl()
61 public PermissionContextImpl withPermission(String... permissions) { in withPermission() argument
62 for (String permission : permissions) { in withPermission()
70 mGrantedPermissions.addAll(Arrays.asList(permissions)); in withPermission()
81 public PermissionContextImpl withPermissionOnVersion(int sdkVersion, String... permissions) { in withPermissionOnVersion() argument
82 return withPermissionOnVersionBetween(sdkVersion, sdkVersion, permissions); in withPermissionOnVersion()
90 int sdkVersion, String... permissions) { in withPermissionOnVersionAtLeast() argument
91 return withPermissionOnVersionBetween(sdkVersion, Versions.ANY, permissions); in withPermissionOnVersionAtLeast()
[all …]
DPermissionsController.java17 package com.android.bedstead.permissions;
22 PermissionContext withPermission(String... permissions); in withPermission() argument
24 PermissionContext withPermissionOnVersion(int sdkVersion, String... permissions); in withPermissionOnVersion() argument
26 PermissionContext withPermissionOnVersionAtLeast(int minSdkVersion, String... permissions); in withPermissionOnVersionAtLeast() argument
28 PermissionContext withPermissionOnVersionAtMost(int maxSdkVersion, String... permissions); in withPermissionOnVersionAtMost() argument
31 int minSdkVersion, int maxSdkVersion, String... permissions); in withPermissionOnVersionBetween() argument
33 PermissionContext withoutPermission(String... permissions); in withoutPermission() argument
DPermissionsAnnotationExecutor.kt16 package com.android.bedstead.permissions
24 import com.android.bedstead.nene.TestApis.permissions
28 import com.android.bedstead.permissions.annotations.EnsureCanGetPermission
29 import com.android.bedstead.permissions.annotations.EnsureDoesNotHaveAppOp
30 import com.android.bedstead.permissions.annotations.EnsureDoesNotHavePermission
31 import com.android.bedstead.permissions.annotations.EnsureHasAppOp
32 import com.android.bedstead.permissions.annotations.EnsureHasPermission
129 ?: permissions().withAppOp(*appOp) in withAppOp()
134 ?: permissions().withoutAppOp(*appOp) in withoutAppOp()
139 ?: permissions().withPermission(*permission) in withPermission()
[all …]
/cts/common/device-side/bedstead/testapp/src/library/main/java/com/android/bedstead/testapp/
DTestAppPermissionContext.java20 import com.android.bedstead.permissions.PermissionContext;
21 import com.android.bedstead.permissions.PermissionContextModifier;
53 public TestAppPermissionContext withPermission(String... permissions) { in withPermission() argument
54 for (String permission : permissions) { in withPermission()
62 mGrantedPermissions.addAll(Arrays.asList(permissions)); in withPermission()
73 public TestAppPermissionContext withPermissionOnVersion(int sdkVersion, String... permissions) { in withPermissionOnVersion() argument
74 return withPermissionOnVersionBetween(sdkVersion, sdkVersion, permissions); in withPermissionOnVersion()
83 int minSdkVersion, String... permissions) { in withPermissionOnVersionAtLeast() argument
84 return withPermissionOnVersionBetween(minSdkVersion, Versions.ANY, permissions); in withPermissionOnVersionAtLeast()
93 int maxSdkVersion, String... permissions) { in withPermissionOnVersionAtMost() argument
[all …]
DTestAppInstancePermissions.java20 import com.android.bedstead.permissions.PermissionContext;
21 import com.android.bedstead.permissions.PermissionsController;
62 public TestAppPermissionContext withPermission(String... permissions) { in withPermission() argument
66 context.withPermission(permissions); in withPermission()
93 public TestAppPermissionContext withPermissionOnVersion(int sdkVersion, String... permissions) { in withPermissionOnVersion() argument
94 return withPermissionOnVersionBetween(sdkVersion, sdkVersion, permissions); in withPermissionOnVersion()
120 int minSdkVersion, String... permissions) { in withPermissionOnVersionAtLeast() argument
121 return withPermissionOnVersionBetween(minSdkVersion, Versions.ANY, permissions); in withPermissionOnVersionAtLeast()
147 int maxSdkVersion, String... permissions) { in withPermissionOnVersionAtMost() argument
148 return withPermissionOnVersionBetween(Versions.ANY, maxSdkVersion, permissions); in withPermissionOnVersionAtMost()
[all …]
/cts/common/device-side/bedstead/modules/permissions/
DAndroid.bp5 // Because of the complex circular dependencies involving the permissions module so far
10 name: "bedstead-permissions-common-srcs",
12 "src/main/kotlin/com/android/bedstead/permissions/annotations/*.kt",
13 "src/main/kotlin/com/android/bedstead/permissions/annotations/*.java",
14 "src/main/kotlin/com/android/bedstead/permissions/CommonPermissions.java",
19 name: "bedstead-permissions-harrier-srcs",
21 "src/main/kotlin/com/android/bedstead/permissions/*.kt",
26 name: "bedstead-permissions-nene-srcs",
28 "src/main/kotlin/com/android/bedstead/permissions/*.java",
33 name: "bedstead-permissions-test",
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/telephony/
DTelephony.kt22 import com.android.bedstead.permissions.CommonPermissions.READ_PRIVILEGED_PHONE_STATE
34 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getDeviceId()
41 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getImei()
48 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getMeid()
55 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getSubscriberId()
62 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getSimSerialNumber()
69 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getNai()
/cts/tests/tests/security/SplitBluetoothPermissionTestApp/src/
DRequestPermissionActivity.kt29 val permissions = intent.getStringArrayExtra("$packageName.PERMISSIONS")!! in onCreate() constant
30 requestPermissions(permissions, 1) in onCreate()
36 permissions: Array<out String>, in onRequestPermissionsResult()
39 super.onRequestPermissionsResult(requestCode, permissions, grantResults) in onRequestPermissionsResult()
41 putExtra("$packageName.PERMISSIONS", permissions) in onRequestPermissionsResult()
/cts/tests/tests/multiuser/src/android/multiuser/cts/
DPermissionHelper.java24 private PermissionHelper(Instrumentation instrumentation, String... permissions) { in PermissionHelper() argument
29 mInstrumentation.getUiAutomation().adoptShellPermissionIdentity(permissions); in PermissionHelper()
38 Instrumentation instrumentation, String... permissions) { in adoptShellPermissionIdentity() argument
39 return new PermissionHelper(instrumentation, permissions); in adoptShellPermissionIdentity()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DShellIdentityUtils.java126 ShellPermissionMethodHelper<T, U> methodHelper, String... permissions) { in invokeMethodWithShellPermissions() argument
130 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeMethodWithShellPermissions()
156 BiFunction<? super T, ? super U, ? extends R> methodHelper, String... permissions) { in invokeMethodWithShellPermissions() argument
160 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeMethodWithShellPermissions()
178 String... permissions) { in invokeMethodWithShellPermissions() argument
182 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeMethodWithShellPermissions()
200 String... permissions) { in invokeMethodWithShellPermissions() argument
204 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeMethodWithShellPermissions()
221 Class<E> clazz, String... permissions) throws E { in invokeThrowableMethodWithShellPermissions() argument
225 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeThrowableMethodWithShellPermissions()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/bluetooth/
DBluetooth.java22 import static com.android.bedstead.permissions.CommonPermissions.BLUETOOTH;
23 import static com.android.bedstead.permissions.CommonPermissions.BLUETOOTH_CONNECT;
24 import static com.android.bedstead.permissions.CommonPermissions.BLUETOOTH_PRIVILEGED;
25 import static com.android.bedstead.permissions.CommonPermissions.INTERACT_ACROSS_USERS;
26 import static com.android.bedstead.permissions.CommonPermissions.INTERACT_ACROSS_USERS_FULL;
27 import static com.android.bedstead.permissions.CommonPermissions.NETWORK_SETTINGS;
40 import com.android.bedstead.permissions.PermissionContext;
74 try (PermissionContext p = TestApis.permissions() in enable()
100 try (PermissionContext p = TestApis.permissions() in disable()
128 TestApis.permissions().withPermissionOnVersionAtMost(R, BLUETOOTH)) { in isEnabled()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/roles/
DRoles.java21 import static com.android.bedstead.permissions.CommonPermissions.BYPASS_ROLE_QUALIFICATION;
22 import static com.android.bedstead.permissions.CommonPermissions.INTERACT_ACROSS_USERS_FULL;
23 import static com.android.bedstead.permissions.CommonPermissions.MANAGE_ROLE_HOLDERS;
35 import com.android.bedstead.permissions.PermissionContext;
64 try (PermissionContext p = TestApis.permissions().withPermission( in setBypassingRoleQualification()
76 try (PermissionContext p = TestApis.permissions().withPermission( in getRoleHolders()
87 try (PermissionContext p = TestApis.permissions().withPermission( in getRoleHoldersAsUser()
/cts/tests/appsearch/testutils/src/android/app/appsearch/testutil/
DSystemUtil.java35 @NonNull ThrowingRunnable runnable, String... permissions) { in runWithShellPermissionIdentity() argument
37 runWithShellPermissionIdentity(automan, runnable, permissions); in runWithShellPermissionIdentity()
52 String... permissions) { in runWithShellPermissionIdentity() argument
53 automan.adoptShellPermissionIdentity(permissions); in runWithShellPermissionIdentity()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/devicepolicy/
DDevicePolicy.kt45 import com.android.bedstead.permissions.CommonPermissions in <lambda>()
46 import com.android.bedstead.permissions.CommonPermissions.INTERACT_ACROSS_USERS_FULL in <lambda>()
47 import com.android.bedstead.permissions.CommonPermissions.MANAGE_DEVICE_POLICY_STORAGE_LIMIT in <lambda>()
48 import com.android.bedstead.permissions.CommonPermissions.NOTIFY_PENDING_SYSTEM_UPDATE in <lambda>()
49 import com.android.bedstead.permissions.CommonPermissions.QUERY_ADMIN_POLICY in <lambda>()
50 import com.android.bedstead.permissions.CommonPermissions.READ_NEARBY_STREAMING_POLICY in <lambda>()
158 TestApis.permissions().withPermission( in <lambda>()
253 TestApis.permissions().withPermission(CommonPermissions.MANAGE_PROFILE_AND_DEVICE_OWNERS) in <lambda>()
264 TestApis.permissions().withPermission( in <lambda>()
280 TestApis.permissions().withPermission( in <lambda>()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/accounts/
DAccounts.java19 import static com.android.bedstead.permissions.CommonPermissions.GET_ACCOUNTS;
20 import static com.android.bedstead.permissions.CommonPermissions.INTERACT_ACROSS_USERS_FULL;
21 import static com.android.bedstead.permissions.CommonPermissions.READ_CONTACTS;
28 import com.android.bedstead.permissions.PermissionContext;
92 try (PermissionContext p = TestApis.permissions().withPermission( in all()
111 try (PermissionContext p = TestApis.permissions().withPermission( in getByType()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/content/
DSuggestions.kt27 import com.android.bedstead.permissions.CommonPermissions.MANAGE_CONTENT_SUGGESTIONS in <lambda>()
50 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>()
55 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>()
76 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>()
82 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>()
90 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/utils/
DTestArtifactUtils.java19 import static com.android.bedstead.permissions.CommonPermissions.MANAGE_EXTERNAL_STORAGE;
20 import static com.android.bedstead.permissions.CommonPermissions.WRITE_EXTERNAL_STORAGE;
27 import com.android.bedstead.permissions.PermissionContext;
59 try (PermissionContext p = TestApis.permissions() in withWritableBaseDir()
/cts/tests/tests/car/lib/CarIntegrationTestUtilsLib/src/android/car/cts/utils/
DShellPermissionUtils.java98 String... permissions) { in runWithShellPermissionIdentity() argument
99 runWithShellPermissionIdentity(throwingRunnable, CHECK_MODE_ASSUME, permissions); in runWithShellPermissionIdentity()
110 @PermissionCheckMode int checkMode, String... permissions) { in runWithShellPermissionIdentity() argument
112 uiAutomation.adoptShellPermissionIdentity(permissions); in runWithShellPermissionIdentity()
115 for (String permission : permissions) { in runWithShellPermissionIdentity()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21254/helper-app/src/android/security/cts/CVE_2023_21254_helper/
DPocActivity.java37 public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] results) { in onRequestPermissionsResult() argument
38 super.onRequestPermissionsResult(requestCode, permissions, results); in onRequestPermissionsResult()
40 && permissions[0].equals(RECORD_AUDIO) in onRequestPermissionsResult()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21249/helper-app/src/android/security/cts/CVE_2023_21249_helper/
DPocActivity.java37 public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] results) { in onRequestPermissionsResult() argument
38 super.onRequestPermissionsResult(requestCode, permissions, results); in onRequestPermissionsResult()
40 && permissions[0].equals(ACCESS_COARSE_LOCATION) in onRequestPermissionsResult()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/settings/
DGlobalSettings.kt26 import com.android.bedstead.permissions.CommonPermissions.INTERACT_ACROSS_USERS_FULL in <lambda>()
38 TestApis.permissions().withPermission( in <lambda>()
70 TestApis.permissions().withPermission(Manifest.permission.WRITE_SECURE_SETTINGS).use { p -> in <lambda>()
82 TestApis.permissions().withPermission( in <lambda>()
114 TestApis.permissions().withPermission(Manifest.permission.WRITE_SECURE_SETTINGS).use { in <lambda>()
126 TestApis.permissions().withPermission(INTERACT_ACROSS_USERS_FULL).use { in <lambda>()
137 TestApis.permissions().withPermission(INTERACT_ACROSS_USERS_FULL).use { in <lambda>()
217 TestApis.permissions().withPermission(INTERACT_ACROSS_USERS_FULL).use { in <lambda>()
264 TestApis.permissions().withPermission( in <lambda>()
294 TestApis.permissions().withPermission(Manifest.permission.WRITE_SECURE_SETTINGS).use { in <lambda>()
/cts/common/device-side/bedstead/harrier/common/src/main/java/com/android/bedstead/harrier/
DEnterprisePolicyWrapper.java34 EnterprisePolicy.Permission[] permissions, EnterprisePolicy.AppOp[] appOps, in EnterprisePolicyWrapper() argument
38 this.mPermissions = permissions; in EnterprisePolicyWrapper()
51 public EnterprisePolicy.Permission[] permissions() { in permissions() method in EnterprisePolicyWrapper

12345678910>>...170