Make ReconcileSdkData more flexible
Instead of passing sdk package names and list of random strings to
installd, the client will pass the sub-directory name directly. The
client will be responsible for ensuring they don't create multiple
sub-directories for same sdk with different random suffixes.
Also, since "shared" sub-directory is just another type of sdk data
sub-directory, we no longer create it during sdk package path creation.
This directory should get created using ReconcileSdkData api by the
client.
Also cleaned up the tests and added SdkSandboxStorageHostTest in
TEST_MAPPING.
Bug: 211763739
Test: atest installd_service_test
Ignore-AOSP-First: Some of the cls are missing in AOSP. Will cherry-pick
this with rest of them together next week.
Change-Id: Ida7a50e0e3ecc8a997239890dfb8f8cb7e7b7871
Change-Id: Ie9cdc2c41bcec64028008a79654f2d38c017b6d1
diff --git a/cmds/installd/InstalldNativeService.h b/cmds/installd/InstalldNativeService.h
index 1f0fc9c..5c21842 100644
--- a/cmds/installd/InstalldNativeService.h
+++ b/cmds/installd/InstalldNativeService.h
@@ -211,8 +211,7 @@
binder::Status createSdkSandboxDataPackageDirectory(const std::optional<std::string>& uuid,
const std::string& packageName,
int32_t userId, int32_t appId,
- int32_t previousAppId,
- const std::string& seInfo, int32_t flags);
+ int32_t flags);
binder::Status clearSdkSandboxDataPackageDirectory(const std::optional<std::string>& uuid,
const std::string& packageName,
int32_t userId, int32_t flags);
@@ -221,8 +220,7 @@
int32_t userId, int32_t flags);
binder::Status reconcileSdkData(const std::optional<std::string>& uuid,
const std::string& packageName,
- const std::vector<std::string>& sdkPackageNames,
- const std::vector<std::string>& randomSuffixes, int32_t userId,
+ const std::vector<std::string>& subDirNames, int32_t userId,
int32_t appId, int32_t previousAppId, const std::string& seInfo,
int flags);
binder::Status restoreconSdkDataLocked(const std::optional<std::string>& uuid,