diff options
author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-07 02:23:07 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-07 02:23:07 +0000 |
commit | 0fd6f02e643bd3d8f54441d4f52c605b2d1d2b68 (patch) | |
tree | 991a1c4b20208850f7cd8f8c3f0b9ede8ed5b756 | |
parent | 633fb2df60c080875e27b338dc03b55f57c360e7 (diff) | |
parent | 9e040fc1f42ce548384ee33f519dbe8e95fe48b4 (diff) | |
download | gsid-0fd6f02e643bd3d8f54441d4f52c605b2d1d2b68.tar.gz |
Merge "Fix the gsi_tool cmd line progress" am: 9e040fc1f4
Change-Id: I490a3fb905503d21858211165f1600da34945e96
-rw-r--r-- | gsi_service.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gsi_service.cpp b/gsi_service.cpp index 7d3a9d1..3705c5b 100644 --- a/gsi_service.cpp +++ b/gsi_service.cpp @@ -201,6 +201,7 @@ binder::Status GsiService::createPartition(const ::std::string& name, int64_t si } installer_ = std::make_unique<PartitionInstaller>(this, install_dir_, name, GetDsuSlot(install_dir_), size, readOnly); + progress_ = {}; int status = installer_->StartInstall(); if (status != INSTALL_OK) { installer_ = nullptr; @@ -247,6 +248,9 @@ binder::Status GsiService::getInstallProgress(::android::gsi::GsiProgress* _aidl ENFORCE_SYSTEM; std::lock_guard<std::mutex> guard(progress_lock_); + if (installer_ == nullptr) { + progress_ = {}; + } *_aidl_return = progress_; return binder::Status::ok(); } |