Per user, per storage type cleanup to match PM behavior.
Bug: 162757029
Test: atest installd_service_test installd_cache_test installd_utils_test installd_dexopt_test installd_otapreopt_test installd_file_test
Change-Id: I7941396fb2120f6636601e45b71490d86d2c4831
diff --git a/cmds/installd/utils.h b/cmds/installd/utils.h
index 986080d..ffde562 100644
--- a/cmds/installd/utils.h
+++ b/cmds/installd/utils.h
@@ -121,9 +121,9 @@
int delete_dir_contents_and_dir(const std::string& pathname, bool ignore_if_missing = false);
bool is_renamed_deleted_dir(std::string_view path);
-
int rename_delete_dir_contents_and_dir(const std::string& pathname, bool ignore_if_missing = false);
-void find_and_delete_renamed_deleted_dirs_under_path(const std::string& pathname);
+
+void cleanup_invalid_package_dirs_under_path(const std::string& pathname);
int delete_dir_contents(const char *pathname,
int also_delete_dir,