Support multiple DSU installations
Bug: 144247097
Test: adb shell gsi_tool install --gsi-size $(du -b system.raw|cut -f1) < system.raw
Change-Id: I17f4292fc3038040cc5848ce00081e96c79ae769
diff --git a/gsi_service.h b/gsi_service.h
index fe70a04..b828899 100644
--- a/gsi_service.h
+++ b/gsi_service.h
@@ -68,7 +68,7 @@
bool* _aidl_return) override;
binder::Status commitGsiChunkFromAshmem(int64_t bytes, bool* _aidl_return) override;
binder::Status cancelGsiInstall(bool* _aidl_return) override;
- binder::Status enableGsi(bool oneShot, int* _aidl_return) override;
+ binder::Status enableGsi(bool oneShot, const std::string& dsuSlot, int* _aidl_return) override;
binder::Status isGsiEnabled(bool* _aidl_return) override;
binder::Status removeGsi(bool* _aidl_return) override;
binder::Status disableGsi(bool* _aidl_return) override;
@@ -76,6 +76,8 @@
binder::Status isGsiRunning(bool* _aidl_return) override;
binder::Status isGsiInstallInProgress(bool* _aidl_return) override;
binder::Status getInstalledGsiImageDir(std::string* _aidl_return) override;
+ binder::Status getActiveDsuSlot(std::string* _aidl_return) override;
+ binder::Status getInstalledDsuSlots(std::vector<std::string>* _aidl_return) override;
binder::Status zeroPartition(const std::string& name, int* _aidl_return) override;
binder::Status openImageService(const std::string& prefix,
android::sp<IImageService>* _aidl_return) override;
@@ -93,8 +95,11 @@
static void RunStartupTasks();
static std::string GetInstalledImageDir();
+ std::string GetActiveDsuSlot();
std::string GetActiveInstalledImageDir();
+ static std::vector<std::string> GetInstalledDsuSlots();
+
private:
GsiService(Gsid* parent);
static int ValidateInstallParams(std::string& install_dir);