[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/InstalldNativeService.h b/cmds/installd/InstalldNativeService.h
index 8af6e24..bee6ac9 100644
--- a/cmds/installd/InstalldNativeService.h
+++ b/cmds/installd/InstalldNativeService.h
@@ -85,22 +85,24 @@
const std::string& compilerFilter, const std::unique_ptr<std::string>& uuid,
const std::unique_ptr<std::string>& classLoaderContext,
const std::unique_ptr<std::string>& seInfo, bool downgrade,
- int32_t targetSdkVersion);
+ int32_t targetSdkVersion, const std::unique_ptr<std::string>& profileName);
binder::Status rmdex(const std::string& codePath, const std::string& instructionSet);
- binder::Status mergeProfiles(int32_t uid, const std::string& packageName, bool* _aidl_return);
+ binder::Status mergeProfiles(int32_t uid, const std::string& packageName,
+ const std::string& profileName, bool* _aidl_return);
binder::Status dumpProfiles(int32_t uid, const std::string& packageName,
- const std::string& codePaths, bool* _aidl_return);
+ const std::string& profileName, const std::string& codePath, bool* _aidl_return);
binder::Status copySystemProfile(const std::string& systemProfile,
- int32_t uid, const std::string& packageName, bool* _aidl_return);
- binder::Status clearAppProfiles(const std::string& packageName);
+ int32_t uid, const std::string& packageName, const std::string& profileName,
+ bool* _aidl_return);
+ binder::Status clearAppProfiles(const std::string& packageName, const std::string& profileName);
binder::Status destroyAppProfiles(const std::string& packageName);
binder::Status createProfileSnapshot(int32_t appId, const std::string& packageName,
- const std::string& codePath, bool* _aidl_return);
+ const std::string& profileName, bool* _aidl_return);
binder::Status destroyProfileSnapshot(const std::string& packageName,
- const std::string& codePath);
+ const std::string& profileName);
binder::Status idmap(const std::string& targetApkPath, const std::string& overlayApkPath,
int32_t uid);