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

Commit 1476c298 authored by Songchun Fan's avatar Songchun Fan
Browse files

[pm] ignore old value of abiOverride in pkgSetting when installing

This reverts a change introduced in ag/10220453, and the correct behavior here should be to use the abiOverride value passed from args.

Test: manual (will add CTS tests)
BUG: 163888243
BUG: 162298405
Change-Id: I93c85b5b8fe94726e450dc467f2cd5aecaa376f9
parent 93c7a848
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -17563,9 +17563,6 @@ public class PackageManagerService extends IPackageManager.Stub
                synchronized (mLock) {
                    pkgSetting = mSettings.getPackageLPr(pkgName);
                }
                String abiOverride =
                        (pkgSetting == null || TextUtils.isEmpty(pkgSetting.cpuAbiOverrideString)
                        ? args.abiOverride : pkgSetting.cpuAbiOverrideString);
                boolean isUpdatedSystemAppFromExistingSetting = pkgSetting != null
                        && pkgSetting.getPkgState().isUpdatedSystemApp();
                AndroidPackage oldPackage = mPackages.get(pkgName);
@@ -17573,7 +17570,7 @@ public class PackageManagerService extends IPackageManager.Stub
                final Pair<PackageAbiHelper.Abis, PackageAbiHelper.NativeLibraryPaths>
                        derivedAbi = mInjector.getAbiHelper().derivePackageAbi(parsedPackage,
                        isUpdatedSystemAppFromExistingSetting || isUpdatedSystemAppInferred,
                        abiOverride);
                        args.abiOverride);
                derivedAbi.first.applyTo(parsedPackage);
                derivedAbi.second.applyTo(parsedPackage);
            } catch (PackageManagerException pme) {