add function to traversal the crates
The system_server needs to traversal Context.getCratesDir() to get all
of crates. But, system_server doesn't have the permission. system_server
needs installd to traverse Context.getCratesDir().
The depth of traversal in Context.getCratesDir is 1. installd returns the
list CrateMetadata. CrateMetadata contains the following information.
* crateName: it is the folder name
To add .gitigTo add .gitignore to collect the ignore file list.
Test: atest \
CtsOsTestCases:android.os.storage.cts.CrateInfoTest \
CtsOsTestCases:android.os.storage.cts.StorageManagerCratesTest \
CtsOsTestCases:android.os.storage.cts.StorageStatsManagerTest
Bug: 141660526
Change-Id: Iea5eee4606e4ff437edef617a1f8db93e37f51c4
diff --git a/cmds/installd/utils.h b/cmds/installd/utils.h
index 6a42026..6a39adc 100644
--- a/cmds/installd/utils.h
+++ b/cmds/installd/utils.h
@@ -82,6 +82,10 @@
std::string create_data_dalvik_cache_path();
+std::string create_system_user_ce_path(userid_t userId);
+
+std::string create_system_user_ce_package_path(userid_t userId, const char* package_name);
+
std::string create_primary_cur_profile_dir_path(userid_t userid);
std::string create_primary_current_profile_package_dir_path(
userid_t user, const std::string& package_name);