[installd] Extend profile operations to take the profile name
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name.
All the profile operations will now work on a specific profile name rather
than assuming a default global name.
(cherry picked from commit 562de815339bedd29206f5f98be44c824945b627)
Test: installd_dexopt_test
Bug: 30934496
Merged-In: I5847d35fe4d3caa5a2b32293426a24683af42030
Change-Id: I5847d35fe4d3caa5a2b32293426a24683af42030
diff --git a/cmds/installd/dexopt.h b/cmds/installd/dexopt.h
index 29312d2..b96351b 100644
--- a/cmds/installd/dexopt.h
+++ b/cmds/installd/dexopt.h
@@ -63,7 +63,10 @@
bool create_profile_snapshot(int32_t app_id, const std::string& package,
const std::string& profile_name);
-bool dump_profiles(int32_t uid, const std::string& pkgname, const char* code_paths);
+bool dump_profiles(int32_t uid,
+ const std::string& pkgname,
+ const std::string& profile_name,
+ const std::string& code_path);
bool copy_system_profile(const std::string& system_profile,
uid_t packageUid,