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

Commit 1485a60b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix install and update times for non-system packages."

parents a2f67c96 5fe4cb1b
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -15835,6 +15835,12 @@ public class PackageManagerService extends IPackageManager.Stub
            if (reconciledPkg.prepareResult.replace) {
                PackageParser.Package oldPackage = mPackages.get(packageName);
                // Set the update and install times
                PackageSetting deletedPkgSetting = (PackageSetting) oldPackage.mExtras;
                setInstallAndUpdateTime(pkg, deletedPkgSetting.firstInstallTime,
                        System.currentTimeMillis());
                if (reconciledPkg.prepareResult.system) {
                    // Remove existing system package
                    removePackageLI(oldPackage, true);
@@ -15850,11 +15856,6 @@ public class PackageManagerService extends IPackageManager.Stub
                        res.removedInfo.args = null;
                    }
                    // Set the update and install times
                    PackageSetting deletedPkgSetting = (PackageSetting) oldPackage.mExtras;
                    setInstallAndUpdateTime(pkg, deletedPkgSetting.firstInstallTime,
                            System.currentTimeMillis());
                    // Update the package dynamic state if succeeded
                    // Now that the install succeeded make sure we remove data
                    // directories for any child package the update removed.