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

Commit 5da86759 authored by Mårten Kongstad's avatar Mårten Kongstad Committed by Todd Kennedy
Browse files

Print correct version code when skipping outdated system packages

When a newer version of a package exists on /data, the package manager
will skip scanning the outdated version on /system. As part of this the
following is printed to logcat:

    Package <name> at <path> ignored: updated version <new-version>
    better than this <old-version>

Teach the package manager to read <new-version> from the correct
variable (it used to be identical to <old-version>).

Bug: 78871949
Test: manual (upgrade a pre-installed app, check logcat on reboot)
Change-Id: Iaa4e43d2f91ca33a0e56e90c233d5d02abed781e
parent 0b930eeb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8748,7 +8748,7 @@ public class PackageManagerService extends IPackageManager.Stub
            // equal to the version on the /data partition. Throw an exception and use
            // the application already installed on the /data partition.
            throw new PackageManagerException(Log.WARN, "Package " + pkg.packageName + " at "
                    + pkg.codePath + " ignored: updated version " + disabledPkgSetting.versionCode
                    + pkg.codePath + " ignored: updated version " + pkgSetting.versionCode
                    + " better than this " + pkg.getLongVersionCode());
        }