From 042570413337de3d59968fe746bf86d640db13e5 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Tue, 13 Feb 2024 21:36:10 +0900 Subject: [PATCH] Use new API to load mapper AServiceManager_getDeclaredPassthroughHal() can replace android_load_sphal_library(). Bug: 325018681 Test: VtsHalGraphicsMapperStableC_TargetTest Change-Id: I004355a9df8bd1ba4f9fb00149d7fddb9ac9f499 --- .../stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp index b329de26a3..1e0c427715 100644 --- a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp +++ b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp @@ -166,7 +166,8 @@ class GraphicsTestsBase { auto status = mAllocator->getIMapperLibrarySuffix(&mapperSuffix); ASSERT_TRUE(status.isOk()) << "Failed to get IMapper library suffix"; std::string lib_name = "mapper." + mapperSuffix + ".so"; - void* so = android_load_sphal_library(lib_name.c_str(), RTLD_LOCAL | RTLD_NOW); + void* so = AServiceManager_openDeclaredPassthroughHal("mapper", mapperSuffix.c_str(), + RTLD_LOCAL | RTLD_NOW); ASSERT_NE(nullptr, so) << "Failed to load " << lib_name; mIMapperLoader = (AIMapper_loadIMapperFn)dlsym(so, "AIMapper_loadIMapper"); ASSERT_NE(nullptr, mIMapperLoader) << "AIMapper_locaIMapper missing from " << lib_name;