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

Commit 3c92b48d authored by Songchun Fan's avatar Songchun Fan
Browse files

[pm] reset incremental progress when package is reinstalled

Incremental installed packages need to have their progress reset during
incremental re-installation.

BUG: 180912311
Test: manual
Change-Id: Ibfc61de67b56440117d5dc37f69223d1047a5c3b
parent a67a1a98
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.ComponentInfo;
import android.content.pm.IntentFilterVerificationInfo;
import android.content.pm.overlay.OverlayPaths;
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.pm.PackageUserState;
@@ -72,6 +71,7 @@ import android.os.SystemClock;
import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.incremental.IncrementalManager;
import android.os.storage.StorageManager;
import android.os.storage.VolumeInfo;
import android.service.pm.PackageServiceDumpProto;
@@ -1028,6 +1028,9 @@ public final class Settings implements Watchable, Snappable {
                pkgSetting.legacyNativeLibraryPathString = legacyNativeLibraryPath;
            }
            pkgSetting.setPath(codePath);
            if (IncrementalManager.isIncrementalPath(codePath.getAbsolutePath())) {
                pkgSetting.incrementalStates = new IncrementalStates();
            }
        }
        // If what we are scanning is a system (and possibly privileged) package,
        // then make it so, regardless of whether it was previously installed only