diff options
author | Saurabh Srivastava <ssrivast@codeaurora.org> | 2019-01-08 17:32:37 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-01-09 20:32:30 -0800 |
commit | 400c1e8b5748ae2ad360aa558ad3552ce4e0227c (patch) | |
tree | cfa0064c238e3c069b239568771337b05fc0563e /android | |
parent | 18c99090be9e90ca419d17410de01bca1bdd90b0 (diff) | |
download | gps-400c1e8b5748ae2ad360aa558ad3552ce4e0227c.tar.gz |
Launch platform specific processes
Launch processes based on whether the
platform is vendor enhanced or not.
Change-Id: I04c074023e631c4f5d1e16ac166612f323b7a868
CRs-Fixed: 2341030
Diffstat (limited to 'android')
-rw-r--r-- | android/1.0/Android.mk | 1 | ||||
-rw-r--r-- | android/1.0/service.cpp | 10 | ||||
-rw-r--r-- | android/1.1/Android.mk | 1 | ||||
-rw-r--r-- | android/1.1/service.cpp | 10 |
4 files changed, 20 insertions, 2 deletions
diff --git a/android/1.0/Android.mk b/android/1.0/Android.mk index 1893560..b8cddd4 100644 --- a/android/1.0/Android.mk +++ b/android/1.0/Android.mk @@ -71,6 +71,7 @@ LOCAL_SHARED_LIBRARIES := \ libdl \ libbase \ libutils \ + libqti_vndfwk_detect \ LOCAL_SHARED_LIBRARIES += \ libhwbinder \ diff --git a/android/1.0/service.cpp b/android/1.0/service.cpp index 6b0f602..2f258ae 100644 --- a/android/1.0/service.cpp +++ b/android/1.0/service.cpp @@ -23,9 +23,17 @@ #include <android/hardware/gnss/1.0/IGnss.h> #include <hidl/LegacySupport.h> +extern "C" { +#include "vndfwk-detect.h" +} + using android::hardware::gnss::V1_0::IGnss; using android::hardware::defaultPassthroughServiceImplementation; int main() { - return defaultPassthroughServiceImplementation<IGnss>(); + if (!isRunningWithVendorEnhancedFramework()) { + return defaultPassthroughServiceImplementation<IGnss>(); + } else { + return -1; + } } diff --git a/android/1.1/Android.mk b/android/1.1/Android.mk index 3c3d734..c3988a9 100644 --- a/android/1.1/Android.mk +++ b/android/1.1/Android.mk @@ -72,6 +72,7 @@ LOCAL_SHARED_LIBRARIES := \ libdl \ libbase \ libutils \ + libqti_vndfwk_detect \ LOCAL_SHARED_LIBRARIES += \ libhwbinder \ diff --git a/android/1.1/service.cpp b/android/1.1/service.cpp index 72cb4e9..ff7a486 100644 --- a/android/1.1/service.cpp +++ b/android/1.1/service.cpp @@ -23,9 +23,17 @@ #include <android/hardware/gnss/1.1/IGnss.h> #include <hidl/LegacySupport.h> +extern "C" { +#include "vndfwk-detect.h" +} + using android::hardware::gnss::V1_1::IGnss; using android::hardware::defaultPassthroughServiceImplementation; int main() { - return defaultPassthroughServiceImplementation<IGnss>(); + if (!isRunningWithVendorEnhancedFramework()) { + return defaultPassthroughServiceImplementation<IGnss>(); + } else { + return -1; + } } |