, privileged
(.. ). preinstalled
, () , . grantSignaturePermission()
:
if (!allowed && (bp.protectionLevel
& PermissionInfo.PROTECTION_FLAG_PREINSTALLED) != 0
&& isSystemApp(pkg)) {
// Any pre-installed system app is allowed to get this permission.
allowed = true;
}
( API, ), . ActivityInfo
:
public static final int FLAG_SYSTEM = 1<<0;
public boolean isSystemApp() {
return (flags & ApplicationInfo.FLAG_SYSTEM) != 0;
}