compat: Add GNSS interface type shim

Change-Id: I2c1afc2be03871efb391a65ae775f2f4632a5731
This commit is contained in:
R0rt1z2 2023-09-18 16:39:17 +00:00 committed by Jan Altensen (Stricted)
parent aea5a5fba5
commit d549dba0e3
2 changed files with 27 additions and 0 deletions

View file

@ -200,6 +200,14 @@ cc_library_shared {
vendor_available: true, 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 { cc_library_shared {
name: "android.hardware.graphics.common@1.0_types", name: "android.hardware.graphics.common@1.0_types",
srcs: ["interfaces/graphics/common/1.0/types.cpp"], srcs: ["interfaces/graphics/common/1.0/types.cpp"],

View file

@ -0,0 +1,19 @@
/*
* Copyright (C) 2023 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <android/hardware/gnss/1.0/IGnssGeofenceCallback.h>
#include <android/hardware/gnss/1.0/types.h>
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);
}