From d549dba0e33dc741abac063834e32d7da6c31632 Mon Sep 17 00:00:00 2001 From: R0rt1z2 Date: Mon, 18 Sep 2023 16:39:17 +0000 Subject: [PATCH] compat: Add GNSS interface type shim Change-Id: I2c1afc2be03871efb391a65ae775f2f4632a5731 --- Android.bp | 8 ++++++++ interfaces/gnss/1.0/types.cpp | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 interfaces/gnss/1.0/types.cpp diff --git a/Android.bp b/Android.bp index 000e754..8d31743 100644 --- a/Android.bp +++ b/Android.bp @@ -200,6 +200,14 @@ cc_library_shared { vendor_available: true, } +cc_library_shared { + name: "android.hardware.gnss@1.0_types", + srcs: ["interfaces/gnss/1.0/types.cpp"], + shared_libs: ["android.hardware.gnss@1.0"], + system_ext_specific: true, + vendor_available: true, +} + cc_library_shared { name: "android.hardware.graphics.common@1.0_types", srcs: ["interfaces/graphics/common/1.0/types.cpp"], diff --git a/interfaces/gnss/1.0/types.cpp b/interfaces/gnss/1.0/types.cpp new file mode 100644 index 0000000..64d7dbb --- /dev/null +++ b/interfaces/gnss/1.0/types.cpp @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2023 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +using android::hardware::gnss::V1_0::toString; +using GeofenceTransition = android::hardware::gnss::V1_0::IGnssGeofenceCallback::GeofenceTransition; + +std::string toStringNotInlined(GeofenceTransition transition) asm( + "_ZN7android8hardware4gnss4V1_08toStringINS2_" + "21IGnssGeofenceCallback18GeofenceTransitionEEENSt3__112basic_stringIcNS6_11char_" + "traitsIcEENS6_9allocatorIcEEEEi"); +std::string toStringNotInlined(GeofenceTransition transition) { + return toString(transition); +}