Move package-wide flags out of parseApplication

Being on SD card and being forward-locked are package-wide flags that
shouldn't depend on an APK having an <application> stanza.

Bug: 6563724
Change-Id: If5f2159cd8e3fa136f959b656d82b05ea6bdfae5
This commit is contained in:
Kenny Root
2012-05-30 15:30:37 -07:00
parent 20c15a4271
commit 7cb9be26c1

View File

@@ -935,7 +935,17 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifest_installLocation,
PARSE_DEFAULT_INSTALL_LOCATION);
pkg.applicationInfo.installLocation = pkg.installLocation;
/* Set the global "forward lock" flag */
if ((flags & PARSE_FORWARD_LOCK) != 0) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_FORWARD_LOCK;
}
/* Set the global "on SD card" flag */
if ((flags & PARSE_ON_SDCARD) != 0) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_EXTERNAL_STORAGE;
}
// Resource boolean are -1, so 1 means we don't know the value.
int supportsSmallScreens = 1;
int supportsNormalScreens = 1;
@@ -1726,14 +1736,6 @@ public class PackageParser {
}
}
if ((flags & PARSE_FORWARD_LOCK) != 0) {
ai.flags |= ApplicationInfo.FLAG_FORWARD_LOCK;
}
if ((flags & PARSE_ON_SDCARD) != 0) {
ai.flags |= ApplicationInfo.FLAG_EXTERNAL_STORAGE;
}
if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_debuggable,
false)) {