Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cb9be26 authored by Kenny Root's avatar Kenny Root
Browse files

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
parent 20c15a42
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -936,6 +936,16 @@ public class PackageParser {
                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)) {