Allow libhidl to be used in recovery
Test: Compiles
Bug: 78793464
Change-Id: Ib6b8e781b8dfe3fad49ae4bb9e7725e07bd5b9b4
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index 50a527a..5f75098 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -39,7 +39,9 @@
#include <android-base/stringprintf.h>
#include <hwbinder/IPCThreadState.h>
#include <hwbinder/Parcel.h>
+#if !defined(__ANDROID_RECOVERY__)
#include <vndksupport/linker.h>
+#endif
#include <android/hidl/manager/1.2/BnHwServiceManager.h>
#include <android/hidl/manager/1.2/BpHwServiceManager.h>
@@ -321,7 +323,9 @@
if (path == HAL_LIBRARY_PATH_SYSTEM) {
handle = dlopen(fullPath.c_str(), dlMode);
} else {
+#if !defined(__ANDROID_RECOVERY__)
handle = android_load_sphal_library(fullPath.c_str(), dlMode);
+#endif
}
if (handle == nullptr) {