Add isImageDisbled to ImageService.
Bug: 205987817
Test: adb remount
Change-Id: I0e5db586995ffcad1f51dd1fef75833b04cc5653
diff --git a/gsi_service.cpp b/gsi_service.cpp
index 2e1de14..6f7ff01 100644
--- a/gsi_service.cpp
+++ b/gsi_service.cpp
@@ -578,6 +578,7 @@
binder::Status removeAllImages() override;
binder::Status removeDisabledImages() override;
binder::Status getMappedImageDevice(const std::string& name, std::string* device) override;
+ binder::Status isImageDisabled(const std::string& name, bool* _aidl_return) override;
private:
bool CheckUid();
@@ -748,6 +749,14 @@
return binder::Status::ok();
}
+binder::Status ImageService::isImageDisabled(const std::string& name, bool* _aidl_return) {
+ if (!CheckUid()) return UidSecurityError();
+
+ std::lock_guard<std::mutex> guard(service_->lock());
+ *_aidl_return = impl_->IsImageDisabled(name);
+ return binder::Status::ok();
+}
+
binder::Status ImageService::getMappedImageDevice(const std::string& name, std::string* device) {
if (!CheckUid()) return UidSecurityError();