Use std::string for profile operations instead of const char
Will make things cleaner when adding secondary dex profile support.
Also, add tests to verify profile path creation.
Bug: 26719109
Test: /data/nativetest64/installd_utils_test/installd_utils_test
Change-Id: I8cb1a11cefee21f5001d2b729110696d52fc8323
diff --git a/cmds/installd/utils.h b/cmds/installd/utils.h
index 425b675..8090b18 100644
--- a/cmds/installd/utils.h
+++ b/cmds/installd/utils.h
@@ -95,10 +95,10 @@
std::string create_data_misc_legacy_path(userid_t userid);
std::string create_data_user_profile_path(userid_t userid);
-std::string create_data_user_profile_package_path(userid_t user, const char* package_name);
+std::string create_data_user_profile_package_path(userid_t user, const std::string& package_name);
std::string create_data_ref_profile_path();
-std::string create_data_ref_profile_package_path(const char* package_name);
+std::string create_data_ref_profile_package_path(const std::string& package_name);
std::string create_data_dalvik_cache_path();