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

Commit 12833541 authored by liulvping's avatar liulvping Committed by android-build-merger
Browse files

Merge "fix system app's abi error after uninstall updated version." am: a863c7f6

am: b9f9a5b6

Change-Id: I8b8d09a28f0640cffc11228eef662a3ad4380ff8
parents ac8f2c94 b9f9a5b6
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -10748,6 +10748,7 @@ public class PackageManagerService extends IPackageManager.Stub
        // them in the case where we're not upgrading or booting for the first time.
        String primaryCpuAbiFromSettings = null;
        String secondaryCpuAbiFromSettings = null;
        boolean needToDeriveAbi = (scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) != 0;
        // writer
        synchronized (mPackages) {
@@ -10825,11 +10826,14 @@ public class PackageManagerService extends IPackageManager.Stub
                }
            }
            if ((scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) == 0) {
            if (!needToDeriveAbi) {
                PackageSetting foundPs = mSettings.getPackageLPr(pkg.packageName);
                if (foundPs != null) {
                    primaryCpuAbiFromSettings = foundPs.primaryCpuAbiString;
                    secondaryCpuAbiFromSettings = foundPs.secondaryCpuAbiString;
                } else {
                    // when re-adding a system package failed after uninstalling updates.
                    needToDeriveAbi = true;
                }
            }
@@ -11036,7 +11040,7 @@ public class PackageManagerService extends IPackageManager.Stub
        final String cpuAbiOverride = deriveAbiOverride(pkg.cpuAbiOverride, pkgSetting);
        if ((scanFlags & SCAN_NEW_INSTALL) == 0) {
            if ((scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) != 0) {
            if (needToDeriveAbi) {
                Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "derivePackageAbi");
                final boolean extractNativeLibs = !pkg.isLibrary();
                derivePackageAbi(pkg, scanFile, cpuAbiOverride, extractNativeLibs,