OSDN Git Service

Route GNSS HAL libbinder traffic to /dev/vndbinder
authorIliyan Malchev <malchev@google.com>
Fri, 14 Apr 2017 07:17:50 +0000 (00:17 -0700)
committerIliyan Malchev <malchev@google.com>
Fri, 14 Apr 2017 16:01:30 +0000 (16:01 +0000)
Bug: 36565056
Test: no more gnss crash at boot

Change-Id: Ib3935beeb521dc655c5d7e1b6d7680a190b3fd4e
Signed-off-by: Iliyan Malchev <malchev@google.com>
gnss/1.0/default/Android.mk
gnss/1.0/default/service.cpp

index 5ad5e50..dd0ebe9 100644 (file)
@@ -47,6 +47,7 @@ LOCAL_SHARED_LIBRARIES := \
     libutils \
     libhardware_legacy \
     libhardware \
+    libbinder \
 
 LOCAL_SHARED_LIBRARIES += \
     libhidlbase \
index 5a8acc1..0704e7f 100644 (file)
@@ -4,9 +4,14 @@
 
 #include <hidl/LegacySupport.h>
 
+#include <binder/ProcessState.h>
+
 using android::hardware::gnss::V1_0::IGnss;
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
+    // The GNSS HAL may communicate to other vendor components via
+    // /dev/vndbinder
+    android::ProcessState::initWithDriver("/dev/vndbinder");
     return defaultPassthroughServiceImplementation<IGnss>();
 }