From fdd02739c24f76846d37807c17c3424d4f0cf718 Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Mon, 28 Dec 2020 19:34:59 +0800 Subject: Revert "GsiService::enableGsi() checks return code of FinishInstall()" This reverts commit 99ab518ed6b7fae95ba29b132227f993e0a099d0. enableGsi() shouldn't check FinishInstall() explicitly, instead the caller of enableGsi() should call closePartition(), and enableGsi() should assume that the installation was successful and any error was handled by the caller already. closePartition() was added in aosp/1404709. This opens up the path for optional DSU partitions. For example, failing to install a overlayFS scratch partition shouldn't be fatal, and the DSU installation should be able to continue without a scratch. Bug: 165925766 Bug: 165471299 Test: TH Change-Id: Ic9b653426cf7fc3c92279e9ceb7c1eb662c15cef --- gsi_service.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gsi_service.cpp b/gsi_service.cpp index 41b8811..14ef1d4 100644 --- a/gsi_service.cpp +++ b/gsi_service.cpp @@ -301,13 +301,7 @@ binder::Status GsiService::enableGsi(bool one_shot, const std::string& dsuSlot, } if (installer_) { ENFORCE_SYSTEM; - int status = installer_->FinishInstall(); installer_ = {}; - if (status != IGsiService::INSTALL_OK) { - *_aidl_return = status; - LOG(ERROR) << "Installation failed, cannot enable DSU for slot: " << dsuSlot; - return binder::Status::ok(); - } // Note: create the install status file last, since this is the actual boot // indicator. if (!SetBootMode(one_shot) || !CreateInstallStatusFile()) { -- cgit v1.2.3