Merge "Use explicit requirements from APEX" into main am: 5de1785959
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2785639
Change-Id: I69c3df91f2cf6dc8637c3a5833360db89eaf2300
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/cas/aidl/default/Android.bp b/cas/aidl/default/Android.bp
index 9d094e0..34ecbf2 100644
--- a/cas/aidl/default/Android.bp
+++ b/cas/aidl/default/Android.bp
@@ -57,7 +57,6 @@
shared_libs: [
"libbinder_ndk",
"liblog",
- "libvndksupport",
],
header_libs: ["media_plugin_headers"],
}
diff --git a/cas/aidl/default/SharedLibrary.cpp b/cas/aidl/default/SharedLibrary.cpp
index 6322ff3..c12d17d 100644
--- a/cas/aidl/default/SharedLibrary.cpp
+++ b/cas/aidl/default/SharedLibrary.cpp
@@ -19,7 +19,6 @@
#include "SharedLibrary.h"
#include <dlfcn.h>
#include <utils/Log.h>
-#include <vndksupport/linker.h>
namespace aidl {
namespace android {
@@ -27,12 +26,12 @@
namespace cas {
SharedLibrary::SharedLibrary(const String8& path) {
- mLibHandle = android_load_sphal_library(path.c_str(), RTLD_NOW);
+ mLibHandle = dlopen(path.c_str(), RTLD_NOW);
}
SharedLibrary::~SharedLibrary() {
if (mLibHandle != NULL) {
- android_unload_sphal_library(mLibHandle);
+ dlclose(mLibHandle);
mLibHandle = NULL;
}
}
diff --git a/cas/aidl/default/manifest.json b/cas/aidl/default/manifest.json
index 16b4f67..cdcecb2 100644
--- a/cas/aidl/default/manifest.json
+++ b/cas/aidl/default/manifest.json
@@ -1,9 +1,8 @@
{
"name": "com.android.hardware.cas",
"version": 1,
- // For CAS HAL to open plugins from /vendor/lib, "vendor" namespace should be imported.
- // ":sphal" is an alias for the "vendor" namespace in Vendor APEX.
+ // For CAS HAL to open plugins from /vendor/lib/mediacas
"requireNativeLibs": [
- ":sphal"
+ ":mediacas"
]
}