summaryrefslogtreecommitdiff
path: root/gsi_service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gsi_service.cpp')
-rw-r--r--gsi_service.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/gsi_service.cpp b/gsi_service.cpp
index 490655c..3c875f8 100644
--- a/gsi_service.cpp
+++ b/gsi_service.cpp
@@ -182,6 +182,21 @@ binder::Status GsiService::createPartition(const ::std::string& name, int64_t si
return binder::Status::ok();
}
+binder::Status GsiService::closePartition(int32_t* _aidl_return) {
+ ENFORCE_SYSTEM;
+ std::lock_guard<std::mutex> guard(lock_);
+
+ if (installer_ == nullptr) {
+ LOG(ERROR) << "createPartition() has to be called before closePartition()";
+ *_aidl_return = IGsiService::INSTALL_ERROR_GENERIC;
+ return binder::Status::ok();
+ }
+ // It is important to not reset |installer_| here because other methods such
+ // as enableGsi() relies on the state of |installer_|.
+ *_aidl_return = installer_->FinishInstall();
+ return binder::Status::ok();
+}
+
binder::Status GsiService::commitGsiChunkFromStream(const android::os::ParcelFileDescriptor& stream,
int64_t bytes, bool* _aidl_return) {
ENFORCE_SYSTEM;