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

Commit 2f68e904 authored by Pawan Wagh's avatar Pawan Wagh Committed by Android (Google) Code Review
Browse files

Merge "Reset mPageSizeAppCompatFlags while upgrading" into main

parents ae3335ff c3dbf3fd
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1645,6 +1645,16 @@ public class PackageSetting extends SettingBase implements PackageStateInternal
        return this;
    }


    /**
     * Clear the page size app compat flags.
     */
    public PackageSetting clearPageSizeAppCompatFlags() {
        this.mPageSizeAppCompatFlags = ApplicationInfo.PAGE_SIZE_APP_COMPAT_FLAG_UNDEFINED;
        onChanged();
        return this;
    }

    /**
     * @see Set page size app compat mode.
     */
+6 −0
Original line number Diff line number Diff line
@@ -437,6 +437,12 @@ final class ScanPackageUtils {
                pkgSetting.getInstallSource().mInitiatingPackageName);
        }

        // If package is upgrading, mPageSizeCompatFlags in PackageSetting should be populated
        // according to the upgraded package.
        if (!createNewPackage) {
            pkgSetting.clearPageSizeAppCompatFlags();
        }

        if (Flags.appCompatOption16kb() && (is16KbDevice || enable4kbChecks)) {
            // Alignment checks are used decide whether this app should run in compat mode when
            // nothing was specified in manifest. Manifest should always take precedence over