Loading core/java/android/content/pm/PackageParser.java +21 −10 Original line number Diff line number Diff line Loading @@ -1441,8 +1441,18 @@ public class PackageParser { */ boolean required = true; // Optional <uses-permission> not supported int maxSdkVersion = 0; TypedValue val = sa.peekValue( com.android.internal.R.styleable.AndroidManifestUsesPermission_maxSdkVersion); if (val != null) { if (val.type >= TypedValue.TYPE_FIRST_INT && val.type <= TypedValue.TYPE_LAST_INT) { maxSdkVersion = val.data; } } sa.recycle(); if ((maxSdkVersion == 0) || (maxSdkVersion >= Build.VERSION.RESOURCES_SDK_INT)) { if (name != null) { int index = pkg.requestedPermissions.indexOf(name); if (index == -1) { Loading @@ -1456,6 +1466,7 @@ public class PackageParser { } } } } XmlUtils.skipCurrentTag(parser); return true; Loading core/res/res/values/attrs_manifest.xml +6 −1 Original line number Diff line number Diff line Loading @@ -1048,6 +1048,11 @@ tag; often this is one of the {@link android.Manifest.permission standard system permissions}. --> <attr name="name" /> <!-- Optional: specify the maximum version of the Android OS for which the application wishes to request the permission. When running on a version of Android higher than the number given here, the permission will not be requested. --> <attr name="maxSdkVersion" format="integer" /> <!-- Specify whether this permission is required for the application. The default is true, meaning the application requires the permission, and it must always be granted when it is installed. Loading Loading @@ -1129,7 +1134,7 @@ on. You can use this to ensure your application is filtered out of later versions of the platform when you know you have incompatibility with them. --> <attr name="maxSdkVersion" format="integer" /> <attr name="maxSdkVersion" /> </declare-styleable> <!-- The <code>library</code> tag declares that this apk is providing itself Loading Loading
core/java/android/content/pm/PackageParser.java +21 −10 Original line number Diff line number Diff line Loading @@ -1441,8 +1441,18 @@ public class PackageParser { */ boolean required = true; // Optional <uses-permission> not supported int maxSdkVersion = 0; TypedValue val = sa.peekValue( com.android.internal.R.styleable.AndroidManifestUsesPermission_maxSdkVersion); if (val != null) { if (val.type >= TypedValue.TYPE_FIRST_INT && val.type <= TypedValue.TYPE_LAST_INT) { maxSdkVersion = val.data; } } sa.recycle(); if ((maxSdkVersion == 0) || (maxSdkVersion >= Build.VERSION.RESOURCES_SDK_INT)) { if (name != null) { int index = pkg.requestedPermissions.indexOf(name); if (index == -1) { Loading @@ -1456,6 +1466,7 @@ public class PackageParser { } } } } XmlUtils.skipCurrentTag(parser); return true; Loading
core/res/res/values/attrs_manifest.xml +6 −1 Original line number Diff line number Diff line Loading @@ -1048,6 +1048,11 @@ tag; often this is one of the {@link android.Manifest.permission standard system permissions}. --> <attr name="name" /> <!-- Optional: specify the maximum version of the Android OS for which the application wishes to request the permission. When running on a version of Android higher than the number given here, the permission will not be requested. --> <attr name="maxSdkVersion" format="integer" /> <!-- Specify whether this permission is required for the application. The default is true, meaning the application requires the permission, and it must always be granted when it is installed. Loading Loading @@ -1129,7 +1134,7 @@ on. You can use this to ensure your application is filtered out of later versions of the platform when you know you have incompatibility with them. --> <attr name="maxSdkVersion" format="integer" /> <attr name="maxSdkVersion" /> </declare-styleable> <!-- The <code>library</code> tag declares that this apk is providing itself Loading