platform_hardware_interfaces/gnss/1.0/default/service.cpp
Iliyan Malchev 2dd67a43b6 Route GNSS HAL libbinder traffic to /dev/vndbinder
Bug: 36565056
Test: no more gnss crash at boot

Change-Id: Ib3935beeb521dc655c5d7e1b6d7680a190b3fd4e
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-04-14 16:01:30 +00:00

17 lines
503 B
C++

#define LOG_TAG "android.hardware.gnss@1.0-service"
#include <android/hardware/gnss/1.0/IGnss.h>
#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>();
}