summaryrefslogtreecommitdiff
path: root/gnss/GnssAdapter.h
diff options
context:
space:
mode:
authorMike Cailean <mcailean@codeaurora.org>2019-02-11 09:11:09 -0800
committerMike Cailean <mcailean@codeaurora.org>2019-03-21 14:57:28 -0700
commitb046241ec2fdc9a48e99face1794046488a8cabe (patch)
treeccbe677775add604af707618bd76ec5d51e5afc5 /gnss/GnssAdapter.h
parent1839fb1140242da10a6a599e65a7b79836007517 (diff)
downloadgps-b046241ec2fdc9a48e99face1794046488a8cabe.tar.gz
Improved Location NI Privacy
Changes to be made starting in Android Q in the way that Location requests made by Location clients other than the Android FrameWork (e.g. Network Initiated AGNSS clients, modem-based clients such as MDT) are handled CRs-fixed: 2397454 Change-Id: Ibb5b9429a1ec1e14ee59d89763d8a78607997615
Diffstat (limited to 'gnss/GnssAdapter.h')
-rw-r--r--gnss/GnssAdapter.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/gnss/GnssAdapter.h b/gnss/GnssAdapter.h
index 1f72c43..e304fe6 100644
--- a/gnss/GnssAdapter.h
+++ b/gnss/GnssAdapter.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -162,6 +162,12 @@ class GnssAdapter : public LocAdapterBase {
AgpsCbInfo mAgpsCbInfo;
void initAgps(const AgpsCbInfo& cbInfo);
+ /* ==== NFW =========================================================================== */
+ NfwStatusCb mNfwCb;
+ inline void initNfw(const NfwCbInfo& cbInfo) {
+ mNfwCb = (NfwStatusCb)cbInfo.visibilityControlCb;
+ }
+
/* ==== ODCPI ========================================================================== */
OdcpiRequestCallback mOdcpiRequestCb;
bool mOdcpiRequestActive;
@@ -308,11 +314,13 @@ public:
/* ======== COMMANDS ====(Called from Client Thread)==================================== */
void initDefaultAgpsCommand();
void initAgpsCommand(const AgpsCbInfo& cbInfo);
+ void initNfwCommand(const NfwCbInfo& cbInfo);
void dataConnOpenCommand(AGpsExtType agpsType,
const char* apnName, int apnLen, AGpsBearerType bearerType);
void dataConnClosedCommand(AGpsExtType agpsType);
void dataConnFailedCommand(AGpsExtType agpsType);
void getGnssEnergyConsumedCommand(GnssEnergyConsumedCallback energyConsumedCb);
+ void nfwControlCommand(bool enable);
/* ========= ODCPI ===================================================================== */
/* ======== COMMANDS ====(Called from Client Thread)==================================== */
@@ -325,8 +333,8 @@ public:
LocationControlCallbacks& getControlCallbacks() { return mControlCallbacks; }
void setControlCallbacks(const LocationControlCallbacks& controlCallbacks)
{ mControlCallbacks = controlCallbacks; }
- void setPowerVoteId(uint32_t id) { mPowerVoteId = id; }
- uint32_t getPowerVoteId() { return mPowerVoteId; }
+ void setAfwControlId(uint32_t id) { mPowerVoteId = id; }
+ uint32_t getAfwControlId() { return mPowerVoteId; }
virtual bool isInSession() { return !mTrackingSessions.empty(); }
void initDefaultAgps();
bool initEngHubProxy();
@@ -363,6 +371,7 @@ public:
virtual bool reportKlobucharIonoModelEvent(GnssKlobucharIonoModel& ionoModel);
virtual bool reportGnssAdditionalSystemInfoEvent(
GnssAdditionalSystemInfo& additionalSystemInfo);
+ virtual void reportNfwNotificationEvent(GnssNfwNotification& notification);
/* ======== UTILITIES ================================================================= */
bool needReport(const UlpLocation& ulpLocation,
@@ -382,6 +391,11 @@ public:
void invokeGnssEnergyConsumedCallback(uint64_t energyConsumedSinceFirstBoot);
void saveGnssEnergyConsumedCallback(GnssEnergyConsumedCallback energyConsumedCb);
void reportLocationSystemInfo(const LocationSystemInfo & locationSystemInfo);
+ inline void reportNfwNotification(const GnssNfwNotification& notification) {
+ if (NULL != mNfwCb) {
+ mNfwCb(notification);
+ }
+ }
/*======== GNSSDEBUG ================================================================*/
bool getDebugReport(GnssDebugReport& report);