diff options
author | Howard Chen <howardsoc@google.com> | 2019-08-23 17:38:51 +0800 |
---|---|---|
committer | Howard Chen <howardsoc@google.com> | 2019-08-28 17:10:51 +0800 |
commit | 96c31fd7d65a6cdd4383cc458ced513ad9fabfc7 (patch) | |
tree | 2f8b73a37e7ddd4fa0debe24eaee41b7225dbd0c /gsi_service.cpp | |
parent | a8e3ed8210b849b4eb0b46a8462eef7e8c110638 (diff) | |
download | gsid-96c31fd7d65a6cdd4383cc458ced513ad9fabfc7.tar.gz |
Add getAllBackingImages to ImageService
Add the getAllBackImages to get all installed backing image names.
This method is needed to support DSU with multiple partitions.
Test: gsi_tool status
Bug: 139402092
Change-Id: I91b83398c0a3c9874a38de94140d8a5f00fcf924
Diffstat (limited to 'gsi_service.cpp')
-rw-r--r-- | gsi_service.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gsi_service.cpp b/gsi_service.cpp index 4835d1f..18bcd96 100644 --- a/gsi_service.cpp +++ b/gsi_service.cpp @@ -399,6 +399,7 @@ static binder::Status UidSecurityError() { class ImageService : public BinderService<ImageService>, public BnImageService { public: ImageService(GsiService* service, std::unique_ptr<ImageManager>&& impl, uid_t uid); + binder::Status getAllBackingImages(std::vector<std::string>* _aidl_return); binder::Status createBackingImage(const std::string& name, int64_t size, int flags) override; binder::Status deleteBackingImage(const std::string& name) override; binder::Status mapImageDevice(const std::string& name, int32_t timeout_ms, @@ -419,6 +420,11 @@ class ImageService : public BinderService<ImageService>, public BnImageService { ImageService::ImageService(GsiService* service, std::unique_ptr<ImageManager>&& impl, uid_t uid) : service_(service), parent_(service->parent()), impl_(std::move(impl)), uid_(uid) {} +binder::Status ImageService::getAllBackingImages(std::vector<std::string>* _aidl_return) { + *_aidl_return = impl_->GetAllBackingImages(); + return binder::Status::ok(); +} + binder::Status ImageService::createBackingImage(const std::string& name, int64_t size, int flags) { if (!CheckUid()) return UidSecurityError(); |