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

Commit 4849c3a9 authored by Daniel Colascione's avatar Daniel Colascione
Browse files

Autocork package invalidations

Bug: 140788621
Test: m; strace -s512 -f -p 1 2>&1 | grep 'cache_key'
Change-Id: Iceaabee5ea8eac42934c1cc4914cdf43d2f11f58
parent bbba8a86
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -8016,13 +8016,16 @@ public abstract class PackageManager {
        sApplicationInfoCache.disableLocal();
    }

    private static final PropertyInvalidatedCache.AutoCorker sCacheAutoCorker =
            new PropertyInvalidatedCache.AutoCorker(PermissionManager.CACHE_KEY_PACKAGE_INFO);

    /**
     * Invalidate caches of package and permission information system-wide.
     *
     * @hide
     */
    public static void invalidatePackageInfoCache() {
        PropertyInvalidatedCache.invalidateCache(PermissionManager.CACHE_KEY_PACKAGE_INFO);
        sCacheAutoCorker.autoCork();
    }

    // Some of the flags don't affect the query result, but let's be conservative and cache