diff options
author | David Anderson <dvander@google.com> | 2019-07-01 19:05:35 -0700 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2019-07-19 13:45:19 -0700 |
commit | 64b53fb4406636ee9fab6a310dafb63dcc28fc2b (patch) | |
tree | 2f8d4fba0b41d4c0ade426562467722b344ff7ae /gsi_service.h | |
parent | 9bdf86390f9bcd530f616967d82e66d3d53a6bfa (diff) | |
download | gsid-64b53fb4406636ee9fab6a310dafb63dcc28fc2b.tar.gz |
Refactor GsiService/GsiInstaller to use ImageManager.
Since ImageManager was mostly lifted from gsi_installer.cpp, it is
straightforward to remove this code and transition entirely to
the new libfiemap.
Bug: 134536978
Test: gsi_tool install, enable/disable, status, wipe
Change-Id: Ic5e19906cfce9018fd5f9029e1e4de3852dbc5a9
Diffstat (limited to 'gsi_service.h')
-rw-r--r-- | gsi_service.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/gsi_service.h b/gsi_service.h index eebe140..ad582dd 100644 --- a/gsi_service.h +++ b/gsi_service.h @@ -72,24 +72,15 @@ class GsiService : public BinderService<GsiService>, public BnGsiService { static char const* getServiceName() { return kGsiServiceName; } // Helper methods for GsiInstaller. - static std::string GetImagePath(const std::string& image_dir, const std::string& name); static bool RemoveGsiFiles(const std::string& install_dir, bool wipeUserdata); bool should_abort() const { return should_abort_; } static void RunStartupTasks(); + static std::string GetInstalledImageDir(); private: friend class ImageManagerService; - using LpMetadata = android::fs_mgr::LpMetadata; - using MetadataBuilder = android::fs_mgr::MetadataBuilder; - using SplitFiemap = android::fiemap::SplitFiemap; - - struct Image { - std::unique_ptr<SplitFiemap> writer; - uint64_t actual_size; - }; - int ValidateInstallParams(GsiInstallParams* params); bool DisableGsiInstall(); int ReenableGsi(bool one_shot); @@ -97,9 +88,6 @@ class GsiService : public BinderService<GsiService>, public BnGsiService { enum class AccessLevel { System, SystemOrShell }; binder::Status CheckUid(AccessLevel level = AccessLevel::System); - static std::string GetInstalledImagePath(const std::string& name); - static std::string GetInstalledImageDir(); - std::mutex* lock() { return &lock_; } std::mutex lock_; |