mediacas: make it also work on 64bit only guest

BUG: 178885191

Change-Id: I15d711dee366f7c39d6a89aecf34c9503bf32da8
This commit is contained in:
bohu
2021-01-30 19:14:05 -08:00
committed by Bo Hu
parent 033cc9a374
commit b305c80409
6 changed files with 29 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ cc_defaults {
"TypeConvert.cpp",
],
compile_multilib: "32",
compile_multilib: "prefer32",
shared_libs: [
"android.hardware.cas@1.0",

View File

@@ -92,7 +92,12 @@ bool FactoryLoader<T>::findFactoryForScheme(
}
// no luck, have to search
#ifdef __LP64__
String8 dirPath("/vendor/lib64/mediacas");
#else
String8 dirPath("/vendor/lib/mediacas");
#endif
DIR* pDir = opendir(dirPath.string());
if (pDir == NULL) {
@@ -127,7 +132,12 @@ bool FactoryLoader<T>::enumeratePlugins(
results->clear();
#ifdef __LP64__
String8 dirPath("/vendor/lib64/mediacas");
#else
String8 dirPath("/vendor/lib/mediacas");
#endif
DIR* pDir = opendir(dirPath.string());
if (pDir == NULL) {

View File

@@ -12,7 +12,7 @@ cc_defaults {
"TypeConvert.cpp",
],
compile_multilib: "32",
compile_multilib: "prefer32",
shared_libs: [
"android.hardware.cas@1.0",

View File

@@ -85,7 +85,11 @@ bool FactoryLoader<T>::findFactoryForScheme(int32_t CA_system_id, sp<SharedLibra
}
// no luck, have to search
#ifdef __LP64__
String8 dirPath("/vendor/lib64/mediacas");
#else
String8 dirPath("/vendor/lib/mediacas");
#endif
DIR* pDir = opendir(dirPath.string());
if (pDir == NULL) {
@@ -118,7 +122,11 @@ bool FactoryLoader<T>::enumeratePlugins(vector<HidlCasPluginDescriptor>* results
results->clear();
#ifdef __LP64__
String8 dirPath("/vendor/lib64/mediacas");
#else
String8 dirPath("/vendor/lib/mediacas");
#endif
DIR* pDir = opendir(dirPath.string());
if (pDir == NULL) {

View File

@@ -12,7 +12,7 @@ cc_defaults {
"TypeConvert.cpp",
],
compile_multilib: "32",
compile_multilib: "prefer32",
shared_libs: [
"android.hardware.cas@1.0",

View File

@@ -85,7 +85,11 @@ bool FactoryLoader<T>::findFactoryForScheme(int32_t CA_system_id, sp<SharedLibra
}
// no luck, have to search
#ifdef __LP64__
String8 dirPath("/vendor/lib64/mediacas");
#else
String8 dirPath("/vendor/lib/mediacas");
#endif
DIR* pDir = opendir(dirPath.string());
if (pDir == NULL) {
@@ -118,7 +122,11 @@ bool FactoryLoader<T>::enumeratePlugins(vector<HidlCasPluginDescriptor>* results
results->clear();
#ifdef __LP64__
String8 dirPath("/vendor/lib64/mediacas");
#else
String8 dirPath("/vendor/lib/mediacas");
#endif
DIR* pDir = opendir(dirPath.string());
if (pDir == NULL) {