summaryrefslogtreecommitdiff
path: root/gsi_service.h
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-06-05 15:04:00 -0700
committerDavid Anderson <dvander@google.com>2019-07-17 21:09:09 -0700
commit6f373b75f1f980305e425002a0a6726b22f1801f (patch)
treeca262e98e80469823a8b565cb186de0286ce2493 /gsi_service.h
parent9ca7728e27cc392ebb0d77f6b862830a7135a7c1 (diff)
downloadgsid-6f373b75f1f980305e425002a0a6726b22f1801f.tar.gz
Introduce a library to contain gsid's image creation logic.
README.md contains a full explanation. GsiInstaller's logic will be removed in a follow-up CL. Bug: 134536978 Test: libgsi_image_test gtest Change-Id: I76f273e06bd8633c6c16e3f3c76ade28e59efe6f
Diffstat (limited to 'gsi_service.h')
-rw-r--r--gsi_service.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gsi_service.h b/gsi_service.h
index 397d2f2..eebe140 100644
--- a/gsi_service.h
+++ b/gsi_service.h
@@ -61,6 +61,8 @@ class GsiService : public BinderService<GsiService>, public BnGsiService {
binder::Status getGsiBootStatus(int* _aidl_return) override;
binder::Status getInstalledGsiImageDir(std::string* _aidl_return) override;
binder::Status wipeGsiUserdata(int* _aidl_return) override;
+ binder::Status openImageManager(const std::string& prefix,
+ android::sp<IImageManager>* _aidl_return) override;
// This is in GsiService, rather than GsiInstaller, since we need to access
// it outside of the main lock which protects the unique_ptr.
@@ -77,6 +79,8 @@ class GsiService : public BinderService<GsiService>, public BnGsiService {
static void RunStartupTasks();
private:
+ friend class ImageManagerService;
+
using LpMetadata = android::fs_mgr::LpMetadata;
using MetadataBuilder = android::fs_mgr::MetadataBuilder;
using SplitFiemap = android::fiemap::SplitFiemap;
@@ -96,7 +100,9 @@ class GsiService : public BinderService<GsiService>, public BnGsiService {
static std::string GetInstalledImagePath(const std::string& name);
static std::string GetInstalledImageDir();
- std::mutex main_lock_;
+ std::mutex* lock() { return &lock_; }
+
+ std::mutex lock_;
std::unique_ptr<GsiInstaller> installer_;
// These are initialized or set in StartInstall().