Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b305c804 authored by bohu's avatar bohu Committed by Bo Hu
Browse files

mediacas: make it also work on 64bit only guest

BUG: 178885191

Change-Id: I15d711dee366f7c39d6a89aecf34c9503bf32da8
parent 033cc9a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ cc_defaults {
      "TypeConvert.cpp",
    ],

    compile_multilib: "32",
    compile_multilib: "prefer32",

    shared_libs: [
      "android.hardware.cas@1.0",
+10 −0
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ cc_defaults {
      "TypeConvert.cpp",
    ],

    compile_multilib: "32",
    compile_multilib: "prefer32",

    shared_libs: [
      "android.hardware.cas@1.0",
+8 −0
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ cc_defaults {
      "TypeConvert.cpp",
    ],

    compile_multilib: "32",
    compile_multilib: "prefer32",

    shared_libs: [
      "android.hardware.cas@1.0",
Loading