diff options
author | Mike Cailean <mcailean@codeaurora.org> | 2019-02-11 09:11:09 -0800 |
---|---|---|
committer | Mike Cailean <mcailean@codeaurora.org> | 2019-03-21 14:57:28 -0700 |
commit | b046241ec2fdc9a48e99face1794046488a8cabe (patch) | |
tree | ccbe677775add604af707618bd76ec5d51e5afc5 /utils | |
parent | 1839fb1140242da10a6a599e65a7b79836007517 (diff) | |
download | gps-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 'utils')
-rw-r--r-- | utils/gps_extended_c.h | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h index abe4f68..64e2c39 100644 --- a/utils/gps_extended_c.h +++ b/utils/gps_extended_c.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-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 @@ -199,6 +199,11 @@ typedef struct { AgpsCbPriority cbPriority; } AgpsCbInfo; +typedef struct { + void* visibilityControlCb; + void* isInEmergencySession; +} NfwCbInfo; + /** GPS extended callback structure. */ typedef struct { /** set to sizeof(LocGpsCallbacks) */ @@ -2038,6 +2043,46 @@ struct AGnssExtStatusIpV6 { uint8_t ipV6Addr[16]; }; +/* +* Represents the the Nfw Notification structure +*/ +#define GNSS_MAX_NFW_STRING_LEN 20 + +typedef enum { + GNSS_NFW_CTRL_PLANE = 0, + GNSS_NFW_SUPL = 1, + GNSS_NFW_IMS = 10, + GNSS_NFW_SIM = 11, + GNSS_NFW_OTHER_PROTOCOL_STACK = 100 +} GnssNfwProtocolStack; + +typedef enum { + GNSS_NFW_CARRIER = 0, + GNSS_NFW_OEM = 10, + GNSS_NFW_MODEM_CHIPSET_VENDOR = 11, + GNSS_NFW_GNSS_CHIPSET_VENDOR = 12, + GNSS_NFW_OTHER_CHIPSET_VENDOR = 13, + GNSS_NFW_AUTOMOBILE_CLIENT = 20, + GNSS_NFW_OTHER_REQUESTOR = 100 +} GnssNfwRequestor; + +typedef enum { + GNSS_NFW_REJECTED = 0, + GNSS_NFW_ACCEPTED_NO_LOCATION_PROVIDED = 1, + GNSS_NFW_ACCEPTED_LOCATION_PROVIDED = 2, +} GnssNfwResponseType; + +typedef struct { + char proxyAppPackageName[GNSS_MAX_NFW_STRING_LEN]; + GnssNfwProtocolStack protocolStack; + char otherProtocolStackName[GNSS_MAX_NFW_STRING_LEN]; + GnssNfwRequestor requestor; + char requestorId[GNSS_MAX_NFW_STRING_LEN]; + GnssNfwResponseType responseType; + bool inEmergencyMode; + bool isCachedLocation; +} GnssNfwNotification; + /* ODCPI Request Info */ enum OdcpiRequestType { ODCPI_REQUEST_TYPE_START, @@ -2060,6 +2105,11 @@ typedef std::function<void(const OdcpiRequestInfo& request)> OdcpiRequestCallbac typedef void (*AgnssStatusIpV4Cb)(AGnssExtStatusIpV4 status); /* +* Callback with NFW information. +*/ +typedef void(*NfwStatusCb)(GnssNfwNotification notification); + +/* * Callback with AGNSS(IpV6) status information. * * @param status Will be of type AGnssExtStatusIpV6. |