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

Commit 0cf101e0 authored by Songchun Fan's avatar Songchun Fan Committed by Android (Google) Code Review
Browse files

Merge "[pm] do not preserve abi override on update"

parents 182c9bc3 7f2b2461
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11671,7 +11671,7 @@ public class PackageManagerService extends IPackageManager.Stub
            configurePackageComponents(parsedPackage);
        }
        final String cpuAbiOverride = deriveAbiOverride(request.cpuAbiOverride, pkgSetting);
        final String cpuAbiOverride = deriveAbiOverride(request.cpuAbiOverride);
        final boolean isUpdatedSystemApp = pkgSetting.getPkgState().isUpdatedSystemApp();
        if ((scanFlags & SCAN_NEW_INSTALL) == 0) {
@@ -17704,7 +17704,7 @@ public class PackageManagerService extends IPackageManager.Stub
                }
                boolean isUpdatedSystemAppFromExistingSetting = pkgSetting != null
                        && pkgSetting.getPkgState().isUpdatedSystemApp();
                final String abiOverride = deriveAbiOverride(args.abiOverride, pkgSetting);
                final String abiOverride = deriveAbiOverride(args.abiOverride);
                AndroidPackage oldPackage = mPackages.get(pkgName);
                boolean isUpdatedSystemAppInferred = oldPackage != null && oldPackage.isSystem();
                final Pair<PackageAbiHelper.Abis, PackageAbiHelper.NativeLibraryPaths>
+4 −9
Original line number Diff line number Diff line
@@ -421,18 +421,13 @@ public class PackageManagerServiceUtils {

    /**
     * Derive the value of the {@code cpuAbiOverride} based on the provided
     * value and an optional stored value from the package settings.
     * value.
     */
    public static String deriveAbiOverride(String abiOverride, PackageSetting settings) {
        String cpuAbiOverride = null;
    public static String deriveAbiOverride(String abiOverride) {
        if (NativeLibraryHelper.CLEAR_ABI_OVERRIDE.equals(abiOverride)) {
            cpuAbiOverride = null;
        } else if (abiOverride != null) {
            cpuAbiOverride = abiOverride;
        } else if (settings != null) {
            cpuAbiOverride = settings.cpuAbiOverrideString;
            return null;
        }
        return cpuAbiOverride;
        return abiOverride;
    }

    /**