diff options
author | Dante Russo <drusso@codeaurora.org> | 2019-10-22 08:18:52 -0700 |
---|---|---|
committer | Dante Russo <drusso@codeaurora.org> | 2019-11-04 16:50:30 -0800 |
commit | 386a7413091314c2ba33ef06f7444cdbeaba7bf1 (patch) | |
tree | 42d99e78eab2dcbefbacd083453e3beac521470a /gnss | |
parent | 91c053b7722254be636445ac4f3b2498cecd5c2d (diff) | |
download | gps-386a7413091314c2ba33ef06f7444cdbeaba7bf1.tar.gz |
Add NI_SUPL_DENY_ON_NFW_LOCKED configuration
If an NI SUPL Request that does not have Privacy
Override option comes when NFW is locked and config
item NI_SUPL_DENY_ON_NFW_LOCKED = 1, then deny it
Change-Id: I0a769c4696751069d5a034dde8569ecfcf63b41a
CRs-fixed: 2550126
Diffstat (limited to 'gnss')
-rw-r--r-- | gnss/GnssAdapter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 980d489..b463046 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -3676,6 +3676,15 @@ GnssAdapter::requestNiNotifyEvent(const GnssNiNotification ¬ify, const void* else { mAdapter.requestNiNotify(mNotify, mData, false); } + } else if ((mAdapter.mSupportNfwControl || 0 == mAdapter.getAfwControlId()) && + GNSS_NI_TYPE_SUPL == mNotify.type && !bIsInEmergency && + !(GNSS_NI_OPTIONS_PRIVACY_OVERRIDE_BIT & mNotify.options) && + (GNSS_CONFIG_GPS_LOCK_NI & ContextBase::mGps_conf.GPS_LOCK) && + 1 == ContextBase::mGps_conf.NI_SUPL_DENY_ON_NFW_LOCKED) { + // If 'Q' Lock behavior OR 'P' Lock behavior and GNSS is Locked + // If an NI SUPL Request that does not have Privacy Override option comes when + // NFW is locked and config item NI_SUPL_DENY_ON_NFW_LOCKED = 1, then deny it + mApi.informNiResponse(GNSS_NI_RESPONSE_DENY, mData); } else { mAdapter.requestNiNotify(mNotify, mData, false); } |