diff options
author | Howard Chen <howardsoc@google.com> | 2019-08-02 11:21:58 +0800 |
---|---|---|
committer | Howard Chen <howardsoc@google.com> | 2019-09-18 15:51:20 +0800 |
commit | 25b18cc44a5fbe7e1578dc96ac200849ffa70183 (patch) | |
tree | 5416480781296d8359f3ac7a28812cd25bb687b9 /gsi_tool.cpp | |
parent | 2d210a8d93e1c7bff5b094d03badec87f089bdc2 (diff) | |
download | gsid-25b18cc44a5fbe7e1578dc96ac200849ffa70183.tar.gz |
Clean up legacy methods and naming
remove: startGsiInstall
framework does not use the old prototype any more.
remove: getGsiStatus
framework does not use it any more.
rename: setGsiBootable -> enableGsi
make it consistent with its reverse action: disableGsi
rename: removeGsiInstall -> removeGsi
rename: disableGsiInstall -> disableGsi
the word install now refers to the installation session.
rename for consistency.
Bug: 138544413
Test: gsi_tool install/enable/disable
adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/system.raw.gz \
--el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
--el KEY_USERDATA_SIZE 8589934592
Change-Id: I974d781d1eca82cecd813ad7bf557c5aec6f8f45
Merged-In: I974d781d1eca82cecd813ad7bf557c5aec6f8f45
Diffstat (limited to 'gsi_tool.cpp')
-rw-r--r-- | gsi_tool.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gsi_tool.cpp b/gsi_tool.cpp index 4f885ae..5cfca97 100644 --- a/gsi_tool.cpp +++ b/gsi_tool.cpp @@ -298,7 +298,7 @@ static int Install(sp<IGsiService> gsid, int argc, char** argv) { progress.Finish(); - status = gsid->setGsiBootable(true, &error); + status = gsid->enableGsi(true, &error); if (!status.isOk() || error != IGsiService::INSTALL_OK) { std::cerr << "Could not make live image bootable: " << ErrorMessage(status, error) << "\n"; return EX_SOFTWARE; @@ -321,7 +321,7 @@ static int Wipe(sp<IGsiService> gsid, int argc, char** /* argv */) { return EX_USAGE; } bool ok; - auto status = gsid->removeGsiInstall(&ok); + auto status = gsid->removeGsi(&ok); if (!status.isOk() || !ok) { std::cerr << "Could not remove GSI install: " << ErrorMessage(status) << "\n"; return EX_SOFTWARE; @@ -474,7 +474,7 @@ static int Enable(sp<IGsiService> gsid, int argc, char** argv) { } int error; - auto status = gsid->setGsiBootable(one_shot, &error); + auto status = gsid->enableGsi(one_shot, &error); if (!status.isOk() || error != IGsiService::INSTALL_OK) { std::cerr << "Error re-enabling GSI: " << ErrorMessage(status, error) << "\n"; return EX_SOFTWARE; @@ -497,7 +497,7 @@ static int Disable(sp<IGsiService> gsid, int argc, char** /* argv */) { } bool ok = false; - gsid->disableGsiInstall(&ok); + gsid->disableGsi(&ok); if (!ok) { std::cerr << "Error disabling GSI" << std::endl; return EX_SOFTWARE; |