GnssBatching API, port from Fused Location
New HAL APIs for Gnss location batches,
still to be connected (default implementation)
similarly to this aspect of fused_location.h,
initially as a single client system API.
Bug: 31974439
Test: Ensured it builds and runs GPS & FLP (in Test app & maps)
Change-Id: I27d3fd2cffad25039b006e60c4496a440dc86c13
diff --git a/gnss/1.0/default/Gnss.h b/gnss/1.0/default/Gnss.h
index e12ac12..36947c1 100644
--- a/gnss/1.0/default/Gnss.h
+++ b/gnss/1.0/default/Gnss.h
@@ -19,6 +19,7 @@
#include <AGnss.h>
#include <AGnssRil.h>
+#include <GnssBatching.h>
#include <GnssConfiguration.h>
#include <GnssDebug.h>
#include <GnssGeofencing.h>
@@ -29,6 +30,7 @@
#include <ThreadCreationWrapper.h>
#include <android/hardware/gnss/1.0/IGnss.h>
+#include <hardware/fused_location.h>
#include <hardware/gps.h>
#include <hidl/Status.h>
@@ -51,6 +53,7 @@
* IGnssCallback interface to be passed into the conventional implementation of the GNSS HAL.
*/
struct Gnss : public IGnss {
+ // TODO: Add flp_device_t, either in ctor, or later attach?
Gnss(gps_device_t* gnss_device);
~Gnss();
@@ -83,6 +86,7 @@
Return<sp<IGnssXtra>> getExtensionXtra() override;
Return<sp<IGnssConfiguration>> getExtensionGnssConfiguration() override;
Return<sp<IGnssDebug>> getExtensionGnssDebug() override;
+ Return<sp<IGnssBatching>> getExtensionGnssBatching() override;
/*
* Callback methods to be passed into the conventional GNSS HAL by the default
@@ -119,6 +123,7 @@
sp<GnssNavigationMessage> mGnssNavigationMessage = nullptr;
sp<GnssDebug> mGnssDebug = nullptr;
sp<GnssConfiguration> mGnssConfig = nullptr;
+ sp<GnssBatching> mGnssBatching = nullptr;
const GpsInterface* mGnssIface = nullptr;
static sp<IGnssCallback> sGnssCbIface;
static std::vector<std::unique_ptr<ThreadFuncArgs>> sThreadFuncArgsList;