am b2c3aa8e: Merge "PackageParser: ignore <uses-permission> android:required on older apps" into jb-mr2-dev
* commit 'b2c3aa8e322a4c08e3aca3a877da3732ec93e042': PackageParser: ignore <uses-permission> android:required on older apps
This commit is contained in:
@@ -1398,6 +1398,17 @@ public class PackageParser {
|
||||
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES;
|
||||
}
|
||||
|
||||
/*
|
||||
* b/8528162: Ignore the <uses-permission android:required> attribute if
|
||||
* targetSdkVersion < JELLY_BEAN_MR2. There are lots of apps in the wild
|
||||
* which are improperly using this attribute, even though it never worked.
|
||||
*/
|
||||
if (pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
for (int i = 0; i < pkg.requestedPermissionsRequired.size(); i++) {
|
||||
pkg.requestedPermissionsRequired.set(i, Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
return pkg;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user