diff options
author | Howard Chen <howardsoc@google.com> | 2020-02-07 02:06:15 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-02-07 02:06:15 +0000 |
commit | 9e040fc1f42ce548384ee33f519dbe8e95fe48b4 (patch) | |
tree | 991a1c4b20208850f7cd8f8c3f0b9ede8ed5b756 /gsi_service.cpp | |
parent | 8b6a9bc9676d91f06835ae492b3b291f3fa458fc (diff) | |
parent | 9f40baffe3ab23dddb00ab3eb18a2c72093789df (diff) | |
download | gsid-9e040fc1f42ce548384ee33f519dbe8e95fe48b4.tar.gz |
Merge "Fix the gsi_tool cmd line progress"
Diffstat (limited to 'gsi_service.cpp')
-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(); } |