diff options
author | Mike Cailean <mcailean@codeaurora.org> | 2019-05-01 13:19:19 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-05-03 09:09:03 -0700 |
commit | aa95ca27f8db9f0a47116344ca4d12042acdb63b (patch) | |
tree | fc5d3c9db30a103a288aa865d68c1b97caff1bba /gnss | |
parent | f4553e1de05456cd0bb1e07e647d19d2ea119b76 (diff) | |
download | gps-aa95ca27f8db9f0a47116344ca4d12042acdb63b.tar.gz |
Process CP_MTLR in emergency in different conditions
Prcess CP_MTLR based on a new configuration item
Change-Id: I9351f574f0b1a4bad2b88f2627ab188ac1522e92
CRs-fixed: 2444954
Diffstat (limited to 'gnss')
-rw-r--r-- | gnss/GnssAdapter.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 31cd886..a6d82bf 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -3409,16 +3409,20 @@ GnssAdapter::requestNiNotifyEvent(const GnssNiNotification ¬ify, const void* mNotify(notify), mData(data) {} inline virtual void proc() const { - if (GNSS_NI_TYPE_EMERGENCY_SUPL == mNotify.type || - GNSS_NI_TYPE_CONTROL_PLANE == mNotify.type) { + if (GNSS_NI_TYPE_EMERGENCY_SUPL == mNotify.type) { if (mAdapter.getE911State() || - ((GNSS_CONFIG_SUPL_EMERGENCY_SERVICES_NO == ContextBase::mGps_conf.SUPL_ES) && - (GNSS_NI_TYPE_EMERGENCY_SUPL == mNotify.type))) { + (GNSS_CONFIG_SUPL_EMERGENCY_SERVICES_NO == ContextBase::mGps_conf.SUPL_ES)) { mApi.informNiResponse(GNSS_NI_RESPONSE_ACCEPT, mData); - } - else { + } else { mApi.informNiResponse(GNSS_NI_RESPONSE_DENY, mData); } + } else if (GNSS_NI_TYPE_CONTROL_PLANE == mNotify.type) { + if (mAdapter.getE911State() && + (1 == ContextBase::mGps_conf.CP_MTLR_ES)) { + mApi.informNiResponse(GNSS_NI_RESPONSE_ACCEPT, mData); + } else { + mAdapter.requestNiNotify(mNotify, mData); + } } else { mAdapter.requestNiNotify(mNotify, mData); } |