Merge "RESTRICT AUTOMERGE: Autocork package invalidations" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-04-17 23:26:42 +00:00
committed by Android (Google) Code Review

View File

@@ -8071,13 +8071,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