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

Commit 1c49b886 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Also include snapshot value in APK cache digest.

We've seen evidence where a runtime restart may have occurred while
a device was still transitioning between isolated storage states; to
ensure that parsed APKs are always invalidated correctly, include
the snapshot state of current boot in the digest.

Bug: 124385369
Test: manual
Change-Id: Ia8d4b5466ae802c31e719c2bc798642c6c73e6c3
parent 147f82a1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3306,7 +3306,8 @@ public class PackageManagerService extends IPackageManager.Stub
        // feature flags should cause us to invalidate any caches.
        final String cacheName = SystemProperties.digestOf(
                "ro.build.fingerprint",
                "persist.sys.isolated_storage");
                StorageManager.PROP_ISOLATED_STORAGE,
                StorageManager.PROP_ISOLATED_STORAGE_SNAPSHOT);
        // Reconcile cache directories, keeping only what we'd actually use.
        for (File cacheDir : FileUtils.listFilesOrEmpty(cacheBaseDir)) {