Home
last modified time | relevance | path

Searched refs:PermissionInfo (Results 1 – 25 of 73) sorted by relevance

123

/frameworks/base/services/permission/java/com/android/server/permission/access/permission/
DPermission.kt19 import android.content.pm.PermissionInfo in <lambda>()
25 val permissionInfo: PermissionInfo, in <lambda>()
51 get() = protection == PermissionInfo.PROTECTION_INTERNAL in <lambda>()
54 get() = protection == PermissionInfo.PROTECTION_NORMAL in <lambda>()
57 get() = protection == PermissionInfo.PROTECTION_DANGEROUS in <lambda>()
60 get() = protection == PermissionInfo.PROTECTION_SIGNATURE in <lambda>()
66 get() = protectionFlags.hasBits(PermissionInfo.PROTECTION_FLAG_APPOP) in <lambda>()
69 get() = protectionFlags.hasBits(PermissionInfo.PROTECTION_FLAG_APP_PREDICTOR) in <lambda>()
72 get() = protectionFlags.hasBits(PermissionInfo.PROTECTION_FLAG_COMPANION) in <lambda>()
75 get() = protectionFlags.hasBits(PermissionInfo.PROTECTION_FLAG_CONFIGURATOR) in <lambda>()
[all …]
/frameworks/base/core/java/android/content/pm/
DPermissionInfo.java44 public class PermissionInfo extends PackageItemInfo implements Parcelable { class
530 case PermissionInfo.PROTECTION_DANGEROUS: in protectionToString()
533 case PermissionInfo.PROTECTION_NORMAL: in protectionToString()
536 case PermissionInfo.PROTECTION_SIGNATURE: in protectionToString()
539 case PermissionInfo.PROTECTION_SIGNATURE_OR_SYSTEM: in protectionToString()
542 case PermissionInfo.PROTECTION_INTERNAL: in protectionToString()
549 if ((level & PermissionInfo.PROTECTION_FLAG_PRIVILEGED) != 0) { in protectionToString()
552 if ((level & PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) { in protectionToString()
555 if ((level & PermissionInfo.PROTECTION_FLAG_APPOP) != 0) { in protectionToString()
558 if ((level & PermissionInfo.PROTECTION_FLAG_PRE23) != 0) { in protectionToString()
[all …]
DPermissionInfo.aidl20 parcelable PermissionInfo;
/frameworks/base/services/core/java/com/android/server/pm/permission/
DPermission.java25 import android.content.pm.PermissionInfo;
61 PermissionInfo.PROTECTION_DANGEROUS,
62 PermissionInfo.PROTECTION_NORMAL,
63 PermissionInfo.PROTECTION_SIGNATURE,
64 PermissionInfo.PROTECTION_SIGNATURE_OR_SYSTEM,
65 PermissionInfo.PROTECTION_INTERNAL,
71 private PermissionInfo mPermissionInfo;
95 mPermissionInfo = new PermissionInfo(); in Permission()
99 mPermissionInfo.protectionLevel = PermissionInfo.PROTECTION_SIGNATURE; in Permission()
103 public Permission(@NonNull PermissionInfo permissionInfo, @PermissionType int type) { in Permission()
[all …]
DLegacyPermission.java22 import android.content.pm.PermissionInfo;
77 private final PermissionInfo mPermissionInfo;
92 public LegacyPermission(@NonNull PermissionInfo permissionInfo, @PermissionType int type, in LegacyPermission()
102 mPermissionInfo = new PermissionInfo(); in LegacyPermission()
106 mPermissionInfo.protectionLevel = PermissionInfo.PROTECTION_SIGNATURE; in LegacyPermission()
118 public PermissionInfo getPermissionInfo() { in getPermissionInfo()
157 PermissionInfo.PROTECTION_NORMAL); in read()
158 bp.mPermissionInfo.protectionLevel = PermissionInfo.fixProtectionLevel( in read()
183 if (mPermissionInfo.protectionLevel != PermissionInfo.PROTECTION_NORMAL) { in write()
224 pw.println(PermissionInfo.protectionToString(mPermissionInfo.protectionLevel)); in dump()
[all …]
DPermissionMigrationHelper.java20 import android.content.pm.PermissionInfo;
67 private final PermissionInfo mPermissionInfo;
70 LegacyPermission(PermissionInfo permissionInfo, int type) { in LegacyPermission()
76 public PermissionInfo getPermissionInfo() { in getPermissionInfo()
DPermissionManagerServiceInterface.java25 import android.content.pm.PermissionInfo;
80 PermissionInfo getPermissionInfo(@NonNull String permName, in getPermissionInfo()
93 List<PermissionInfo> queryPermissionsByGroup(String groupName, in queryPermissionsByGroup()
125 boolean addPermission(PermissionInfo info, boolean async); in addPermission()
520 List<PermissionInfo> getAllPermissionsWithProtection( in getAllPermissionsWithProtection()
521 @PermissionInfo.Protection int protection); in getAllPermissionsWithProtection()
524 @NonNull List<PermissionInfo> getAllPermissionsWithProtectionFlags( in getAllPermissionsWithProtectionFlags()
525 @PermissionInfo.ProtectionFlags int protectionFlags); in getAllPermissionsWithProtectionFlags()
DPermissionManagerServiceTestingShim.java23 import android.content.pm.PermissionInfo;
114 public PermissionInfo getPermissionInfo(@NonNull String permName, int flags, in getPermissionInfo()
116 PermissionInfo oldVal = mOldImplementation.getPermissionInfo(permName, flags, in getPermissionInfo()
118 PermissionInfo newVal = mNewImplementation.getPermissionInfo(permName, flags, in getPermissionInfo()
128 public List<PermissionInfo> queryPermissionsByGroup(String groupName, int flags) { in queryPermissionsByGroup()
129 List<PermissionInfo> oldVal = mOldImplementation.queryPermissionsByGroup(groupName, in queryPermissionsByGroup()
131 List<PermissionInfo> newVal = mNewImplementation.queryPermissionsByGroup(groupName, flags); in queryPermissionsByGroup()
140 public boolean addPermission(PermissionInfo info, boolean async) { in addPermission()
434 public List<PermissionInfo> getAllPermissionsWithProtection(int protection) { in getAllPermissionsWithProtection()
435 List<PermissionInfo> oldVal = mOldImplementation.getAllPermissionsWithProtection( in getAllPermissionsWithProtection()
[all …]
DPermissionManagerServiceInternal.java24 import android.content.pm.PermissionInfo;
169 List<PermissionInfo> getAllPermissionsWithProtection( in getAllPermissionsWithProtection()
170 @PermissionInfo.Protection int protection); in getAllPermissionsWithProtection()
174 @NonNull List<PermissionInfo> getAllPermissionsWithProtectionFlags( in getAllPermissionsWithProtectionFlags()
175 @PermissionInfo.ProtectionFlags int protectionFlags); in getAllPermissionsWithProtectionFlags()
DPermissionManagerServiceLoggingDecorator.java22 import android.content.pm.PermissionInfo;
97 public PermissionInfo getPermissionInfo(@NonNull String permName, int flags, in getPermissionInfo()
105 public List<PermissionInfo> queryPermissionsByGroup(String groupName, int flags) { in queryPermissionsByGroup()
112 public boolean addPermission(PermissionInfo info, boolean async) { in addPermission()
334 public List<PermissionInfo> getAllPermissionsWithProtection(int protection) { in getAllPermissionsWithProtection()
341 public List<PermissionInfo> getAllPermissionsWithProtectionFlags(int protectionFlags) { in getAllPermissionsWithProtectionFlags()
DPermissionManagerServiceTracingDecorator.java22 import android.content.pm.PermissionInfo;
120 public PermissionInfo getPermissionInfo(@NonNull String permName, int flags, in getPermissionInfo()
131 public List<PermissionInfo> queryPermissionsByGroup(String groupName, int flags) { in queryPermissionsByGroup()
142 public boolean addPermission(PermissionInfo info, boolean async) { in addPermission()
486 public List<PermissionInfo> getAllPermissionsWithProtection(int protection) { in getAllPermissionsWithProtection()
498 public List<PermissionInfo> getAllPermissionsWithProtectionFlags(int protectionFlags) { in getAllPermissionsWithProtectionFlags()
/frameworks/base/services/permission/java/com/android/server/permission/access/util/
DPermissionInfoExtensions.kt19 import android.content.pm.PermissionInfo
21 inline val PermissionInfo.isRuntime: Boolean
22 get() = protection == PermissionInfo.PROTECTION_DANGEROUS
24 inline val PermissionInfo.isInternal: Boolean
25 get() = protection == PermissionInfo.PROTECTION_INTERNAL
/frameworks/base/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/
DAppIdPermissionPolicyPermissionStatesTest.kt19 import android.content.pm.PermissionInfo
55 testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_NORMAL) {} in testEvaluatePermissionState_normalPermissionAlreadyGranted_remainsUnchanged()
73 PermissionInfo.PROTECTION_NORMAL, in testEvaluatePermissionState_normalPermissionNotInstallRevoked_getsGranted()
93 PermissionInfo.PROTECTION_NORMAL or PermissionInfo.PROTECTION_FLAG_APPOP in testEvaluatePermissionState_normalAppOpPermission_getsRoleAndUserSetFlagsPreserved()
110 testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_INTERNAL) { in testEvaluatePermissionState_internalWasGrantedWithMissingPackage_getsProtectionGranted()
132 PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_APPOP in testEvaluatePermissionState_internalAppOpPermission_getsRoleAndUserSetFlagsPreserved()
155 PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_DEVELOPMENT in testEvaluatePermissionState_internalDevelopmentPermission_getsRuntimeGrantedPreserved()
179 PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_ROLE in testEvaluatePermissionState_internalRolePermission_getsRoleAndRuntimeGrantedPreserved()
202 PermissionInfo.PROTECTION_SIGNATURE or PermissionInfo.PROTECTION_FLAG_PRIVILEGED, in testEvaluatePermissionState_signaturePrivilegedPermissionNotAllowlisted_isNotGranted()
234 PermissionInfo.PROTECTION_SIGNATURE, in testEvaluatePermissionState_nonPrivilegedShouldGrantBySignature_getsProtectionGranted()
[all …]
DAppIdPermissionPolicyTest.kt20 import android.content.pm.PermissionInfo
160 permissionInfoFlags = PermissionInfo.FLAG_SOFT_RESTRICTED in testOnPackageInstalled_nonSystemAppIsInstalled_upgradeExemptFlagIsCleared()
178 permissionInfoFlags = PermissionInfo.FLAG_SOFT_RESTRICTED, in testOnPackageInstalled_systemAppIsInstalled_upgradeExemptFlagIsRetained()
197 permissionInfoFlags = PermissionInfo.FLAG_SOFT_RESTRICTED in testOnPackageInstalled_requestedPermissionAlsoRequestedBySystemApp_exemptFlagIsRetained()
223 permissionInfoFlags = PermissionInfo.FLAG_HARD_RESTRICTED in testOnPackageInstalled_restrictedPermissionsNotExempt_getsRestrictionFlags()
245 protectionLevel = PermissionInfo.PROTECTION_DANGEROUS, in testOnPackageInstalled()
DAppIdPermissionPolicyPermissionDefinitionsTest.kt19 import android.content.pm.PermissionInfo
302 testPermissionChanged(newProtectionLevel = PermissionInfo.PROTECTION_INTERNAL) in testPermissionChanged_protectionLevelChanged_getsRevoked()
318 newProtectionLevel: Int = PermissionInfo.PROTECTION_DANGEROUS in testPermissionChanged()
324 protectionLevel = PermissionInfo.PROTECTION_DANGEROUS in testPermissionChanged()
427 protectionLevel = PermissionInfo.PROTECTION_DANGEROUS in testTrimPermissionStates_permissionsNoLongerRequested_getsFlagsRevoked()
563 protectionLevel = PermissionInfo.PROTECTION_DANGEROUS in testRevokePermissionsOnPackageUpdate()
695 protectionLevel = PermissionInfo.PROTECTION_SIGNATURE in testEvaluateNormalPermissionStateWithPermissionChanges()
DAppIdPermissionPolicyPermissionResetTest.kt19 import android.content.pm.PermissionInfo
64 protectionLevel = PermissionInfo.PROTECTION_DANGEROUS, in testResetRuntimePermissions()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DPermissionInfoTest.java46 PermissionInfo permissionInfo = new PermissionInfo(); in createFromParcel_returnsKnownCerts()
48 PermissionInfo.PROTECTION_SIGNATURE | PermissionInfo.PROTECTION_FLAG_KNOWN_SIGNER; in createFromParcel_returnsKnownCerts()
56 PermissionInfo unparceledPermissionInfo = PermissionInfo.CREATOR.createFromParcel(parcel); in createFromParcel_returnsKnownCerts()
/frameworks/base/core/java/com/android/internal/pm/pkg/component/
DParsedPermissionUtils.java22 import android.content.pm.PermissionInfo;
97 PermissionInfo.PROTECTION_NORMAL)) in parsePermission()
135 permission.setFlags(permission.getFlags() & ~PermissionInfo.FLAG_HARD_RESTRICTED); in parsePermission()
136 permission.setFlags(permission.getFlags() & ~PermissionInfo.FLAG_SOFT_RESTRICTED); in parsePermission()
139 if ((permission.getFlags() & PermissionInfo.FLAG_HARD_RESTRICTED) != 0 in parsePermission()
140 && (permission.getFlags() & PermissionInfo.FLAG_SOFT_RESTRICTED) != 0) { in parsePermission()
148 PermissionInfo.fixProtectionLevel(permission.getProtectionLevel())); in parsePermission()
151 & ~(PermissionInfo.PROTECTION_FLAG_APPOP | PermissionInfo.PROTECTION_FLAG_INSTANT in parsePermission()
152 | PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY); in parsePermission()
154 && getProtection(permission) != PermissionInfo.PROTECTION_SIGNATURE in parsePermission()
[all …]
/frameworks/base/core/java/android/permission/
DIPermissionManager.aidl22 import android.content.pm.PermissionInfo;
38 PermissionInfo getPermissionInfo(String permissionName, String packageName, int flags); in getPermissionInfo()
42 boolean addPermission(in PermissionInfo permissionInfo, boolean async); in addPermission()
DILegacyPermissionManager.aidl21 import android.content.pm.PermissionInfo;
/frameworks/base/services/core/java/com/android/server/policy/
DPermissionPolicyService.java61 import android.content.pm.PermissionInfo;
251 final List<PermissionInfo> dangerousPerms = in onStart()
253 PermissionInfo.PROTECTION_DANGEROUS); in onStart()
257 PermissionInfo perm = dangerousPerms.get(i); in onStart()
276 final List<PermissionInfo> appOpPermissionInfos = in onStart()
278 PermissionInfo.PROTECTION_FLAG_APPOP); in onStart()
282 final PermissionInfo appOpPermissionInfo = appOpPermissionInfos.get(i); in onStart()
785 private final @NonNull ArrayMap<String, PermissionInfo> mRuntimeAndTheirBgPermissionInfos;
828 List<PermissionInfo> permissionInfos = in PermissionToOpSynchroniser()
830 PermissionInfo.PROTECTION_DANGEROUS); in PermissionToOpSynchroniser()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/activity/
DMetaDataTest.java23 import android.content.pm.PermissionInfo;
157 PermissionInfo pi = mContext.getPackageManager().getPermissionInfo( in testPermissionWithData()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/backup/testutils/
DPackageManagerStub.java23 import android.content.pm.PermissionInfo;
125 public PermissionInfo getPermissionInfo(String name, int flags) in getPermissionInfo()
131 public List<PermissionInfo> queryPermissionsByGroup(String group, int flags) in queryPermissionsByGroup()
224 public boolean addPermission(PermissionInfo info) { in addPermission()
229 public boolean addPermissionAsync(PermissionInfo info) { in addPermissionAsync()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
DBridgePackageManager.java42 import android.content.pm.PermissionInfo;
153 public PermissionInfo getPermissionInfo(String name, int flags) throws NameNotFoundException { in getPermissionInfo()
158 public List<PermissionInfo> queryPermissionsByGroup(String group, int flags) in queryPermissionsByGroup()
281 public boolean addPermission(PermissionInfo info) { in addPermission()
286 public boolean addPermissionAsync(PermissionInfo info) { in addPermissionAsync()
/frameworks/base/services/robotests/src/com/android/server/pm/
DCrossProfileAppsServiceImplRoboTest.java51 import android.content.pm.PermissionInfo;
434 private PermissionInfo createCrossProfilesPermissionInfo() { in createCrossProfilesPermissionInfo()
435 PermissionInfo permissionInfo = new PermissionInfo(); in createCrossProfilesPermissionInfo()
437 permissionInfo.protectionLevel = PermissionInfo.PROTECTION_FLAG_APPOP; in createCrossProfilesPermissionInfo()

123