summaryrefslogtreecommitdiff
path: root/drm/1.0/default/LegacyPluginPath.cpp
diff options
context:
space:
mode:
authorBill Peckham <bpeckham@google.com>2018-09-05 13:08:15 -0700
committerBill Peckham <bpeckham@google.com>2018-09-05 13:08:53 -0700
commitd190f3a68a52f0b7b32fdc52fc21482d9e93c095 (patch)
treedbbf7a05367c3bf041fdeeff17329661b400bad9 /drm/1.0/default/LegacyPluginPath.cpp
parent21431e337b6b9a6e967f8f32716b35f7f37d8304 (diff)
Merge QP1A.180823.001
Change-Id: I0e80bda07db2ee67575e7d3c8bde46bf29d8c790
Diffstat (limited to 'drm/1.0/default/LegacyPluginPath.cpp')
-rw-r--r--drm/1.0/default/LegacyPluginPath.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/drm/1.0/default/LegacyPluginPath.cpp b/drm/1.0/default/LegacyPluginPath.cpp
index 369059d2c7..d0a8f90a77 100644
--- a/drm/1.0/default/LegacyPluginPath.cpp
+++ b/drm/1.0/default/LegacyPluginPath.cpp
@@ -16,6 +16,8 @@
#include "LegacyPluginPath.h"
+#include <unistd.h>
+
#include <cutils/properties.h>
namespace android {
@@ -24,12 +26,16 @@ namespace drm {
namespace V1_0 {
namespace implementation {
+// 64-bit DRM depends on OEM libraries that aren't
+// provided for all devices. If the drm hal service
+// is running as 64-bit use the 64-bit libs, otherwise
+// use the 32-bit libs.
const char* getDrmPluginPath() {
- if (property_get_bool("drm.64bit.enabled", false)) {
- return "/vendor/lib64/mediadrm";
- } else {
- return "/vendor/lib/mediadrm";
- }
+#if defined(__LP64__)
+ return "/vendor/lib64/mediadrm";
+#else
+ return "/vendor/lib/mediadrm";
+#endif
}
} // namespace implementation