Remove from preloads/file_cache when clearing the cache
Test: pm trim-caches 50G internal
Bug: 31008665
Change-Id: If74f4d3c2d838ecb924aba84ad76293af34089bc
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index ede31fc..5833901 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -961,6 +961,10 @@
add_cache_files(cache,
StringPrintf("%s/Android/data", create_data_media_path(uuid_, user).c_str()));
}
+ // Add files from /data/preloads/file_cache
+ if (uuid == nullptr) {
+ add_preloads_file_cache(cache, uuid_);
+ }
ATRACE_END();
ATRACE_BEGIN("clear");