diff --git a/fs_mgr/libfiemap/Android.bp b/fs_mgr/libfiemap/Android.bp index 2fd463c3f..ac589c77e 100644 --- a/fs_mgr/libfiemap/Android.bp +++ b/fs_mgr/libfiemap/Android.bp @@ -45,6 +45,7 @@ cc_defaults { whole_static_libs: [ "gsi_aidl_interface-cpp", "libgsi", + "libgsid", ], shared_libs: [ "libbinder", diff --git a/fs_mgr/libfiemap/binder.cpp b/fs_mgr/libfiemap/binder.cpp index 5e29d4e26..c8516ab2a 100644 --- a/fs_mgr/libfiemap/binder.cpp +++ b/fs_mgr/libfiemap/binder.cpp @@ -19,9 +19,9 @@ #include #include #include -#include #include #include +#include namespace android { namespace fiemap { @@ -224,19 +224,9 @@ bool ImageManagerBinder::MapAllImages(const std::function GetGsiService() { - auto sm = android::defaultServiceManager(); - auto name = android::String16(kGsiServiceName); - android::sp res = sm->waitForService(name); - if (res) { - return android::interface_cast(res); - } - return nullptr; -} - std::unique_ptr IImageManager::Open( const std::string& dir, const std::chrono::milliseconds& /*timeout_ms*/) { - android::sp service = GetGsiService(); + android::sp service = android::gsi::GetGsiService(); android::sp manager; auto status = service->openImageService(dir, &manager);