Skip to content

Commit 03e93e5

Browse files
krutonAndroid (Google) Code Review
authored andcommitted
Merge "Move package-wide flags out of parseApplication" into jb-dev
2 parents 90f658e + 7cb9be2 commit 03e93e5

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

core/java/android/content/pm/PackageParser.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,17 @@ private Package parsePackage(
935935
com.android.internal.R.styleable.AndroidManifest_installLocation,
936936
PARSE_DEFAULT_INSTALL_LOCATION);
937937
pkg.applicationInfo.installLocation = pkg.installLocation;
938-
938+
939+
/* Set the global "forward lock" flag */
940+
if ((flags & PARSE_FORWARD_LOCK) != 0) {
941+
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_FORWARD_LOCK;
942+
}
943+
944+
/* Set the global "on SD card" flag */
945+
if ((flags & PARSE_ON_SDCARD) != 0) {
946+
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_EXTERNAL_STORAGE;
947+
}
948+
939949
// Resource boolean are -1, so 1 means we don't know the value.
940950
int supportsSmallScreens = 1;
941951
int supportsNormalScreens = 1;
@@ -1726,14 +1736,6 @@ private boolean parseApplication(Package owner, Resources res,
17261736
}
17271737
}
17281738

1729-
if ((flags & PARSE_FORWARD_LOCK) != 0) {
1730-
ai.flags |= ApplicationInfo.FLAG_FORWARD_LOCK;
1731-
}
1732-
1733-
if ((flags & PARSE_ON_SDCARD) != 0) {
1734-
ai.flags |= ApplicationInfo.FLAG_EXTERNAL_STORAGE;
1735-
}
1736-
17371739
if (sa.getBoolean(
17381740
com.android.internal.R.styleable.AndroidManifestApplication_debuggable,
17391741
false)) {

0 commit comments

Comments
 (0)