[installd] Create profile snaphots for boot image
Create the profile snapshot for the boot image by aggregating all primary
profiles. During aggregation data that does not belong to the boot image
is filtered out. The matching is done based on the dex files provided in
the classpath argument.
Test: installd_dexopt_test
Bug: 30934496
Change-Id: Ib980ab3feb9f9838dff81a3861693cd08b1df9ab
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index a6c9383..9c9b75b 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -1872,12 +1872,13 @@
}
binder::Status InstalldNativeService::createProfileSnapshot(int32_t appId,
- const std::string& packageName, const std::string& profileName, bool* _aidl_return) {
+ const std::string& packageName, const std::string& profileName,
+ const std::string& classpath, bool* _aidl_return) {
ENFORCE_UID(AID_SYSTEM);
CHECK_ARGUMENT_PACKAGE_NAME(packageName);
std::lock_guard<std::recursive_mutex> lock(mLock);
- *_aidl_return = create_profile_snapshot(appId, packageName, profileName);
+ *_aidl_return = create_profile_snapshot(appId, packageName, profileName, classpath);
return ok();
}