Home
last modified time | relevance | path

Searched refs:protectionLevel (Results 1 – 8 of 8) sorted by relevance

/cts/hostsidetests/appsecurity/test-apps/PermissionPolicy25/src/com/android/cts/permission/policy/
DPermissionPolicyTest25.java45 final int protectionLevel = permissionInfo.protectionLevel in testNoProtectionFlagsAddedToNonSignatureProtectionPermissions() local
49 final int protectionFlags = permissionInfo.protectionLevel & ~protectionLevel; in testNoProtectionFlagsAddedToNonSignatureProtectionPermissions()
50 if (protectionLevel == PermissionInfo.PROTECTION_NORMAL && protectionFlags != 0) { in testNoProtectionFlagsAddedToNonSignatureProtectionPermissions()
52 + protectionFlagsToString(permissionInfo.protectionLevel) in testNoProtectionFlagsAddedToNonSignatureProtectionPermissions()
55 if (protectionLevel == PermissionInfo.PROTECTION_DANGEROUS && protectionFlags != 0) { in testNoProtectionFlagsAddedToNonSignatureProtectionPermissions()
57 + protectionFlagsToString(permissionInfo.protectionLevel) in testNoProtectionFlagsAddedToNonSignatureProtectionPermissions()
66 private static String protectionFlagsToString(int protectionLevel) { in protectionFlagsToString() argument
68 if ((protectionLevel & PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY) != 0) { in protectionFlagsToString()
70 protectionLevel &= ~PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY; in protectionFlagsToString()
72 if ((protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTANT) != 0) { in protectionFlagsToString()
[all …]
/cts/tests/tests/permission2/src/android/permission2/cts/
DPermissionPolicyTest.java141 final int expectedProtection = expectedPermission.protectionLevel in platformPermissionPolicyIsUnaltered()
143 final int declaredProtection = declaredPermission.protectionLevel in platformPermissionPolicyIsUnaltered()
166 expectedPermission.protectionLevel & ~PROTECTION_MASK_BASE; in platformPermissionPolicyIsUnaltered()
178 if ((declaredPermission.protectionLevel & PermissionInfo.PROTECTION_DANGEROUS) != 0) { in platformPermissionPolicyIsUnaltered()
234 if ((info.protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTANT) != 0) { in platformPermissionPolicyIsUnaltered()
342 int protectionLevel = 0; in parseProtectionLevel() local
347 protectionLevel |= PermissionInfo.PROTECTION_NORMAL; in parseProtectionLevel()
350 protectionLevel |= PermissionInfo.PROTECTION_DANGEROUS; in parseProtectionLevel()
353 protectionLevel |= PermissionInfo.PROTECTION_SIGNATURE; in parseProtectionLevel()
356 protectionLevel |= PermissionInfo.PROTECTION_SIGNATURE; in parseProtectionLevel()
[all …]
DPrivappPermissionsTest.java92 int protectionLevel = permission.protectionLevel; in privappPermissionsNeedToBeWhitelisted() local
93 if ((protectionLevel & PermissionInfo.PROTECTION_FLAG_PRIVILEGED) != 0) { in privappPermissionsNeedToBeWhitelisted()
/cts/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/src/com/android/cts/escalatepermission/
DPermissionEscalationTest.java42 PermissionInfo.PROTECTION_NORMAL, (stealAudio1Permission1.protectionLevel in testCannotEscalateNonRuntimePermissionsToRuntime()
49 PermissionInfo.PROTECTION_SIGNATURE, (stealAudio1Permission2.protectionLevel in testCannotEscalateNonRuntimePermissionsToRuntime()
/cts/tests/tests/content/src/android/content/pm/cts/
DPermissionInfoTest.java60 assertEquals(expected.protectionLevel, actual.protectionLevel); in checkInfoSame()
DPackageManagerTest.java674 assertEquals(PermissionInfo.PROTECTION_NORMAL, declaredPermission.protectionLevel); in assertTestPackageInfo()
834 permissionInfo.protectionLevel = PermissionInfo.PROTECTION_NORMAL; in testAddPermission_cantAddOutsideRoot()
851 permissionInfo.protectionLevel = PermissionInfo.PROTECTION_NORMAL; in testAddPermission()
861 assertEquals(PermissionInfo.PROTECTION_NORMAL, savedInfo.protectionLevel); in testAddPermission()
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/
DPackageDeviceInfo.java207 pi.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE); in writePermissionsDetails()
209 pi.protectionLevel & ~PermissionInfo.PROTECTION_MASK_BASE); in writePermissionsDetails()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DTestListActivity.java62 if ((info.protectionLevel & PermissionInfo.PROTECTION_DANGEROUS) == 0) { in onCreate()