Process CP_MTLR in emergency in different conditions
Prcess CP_MTLR based on a new configuration item Change-Id: I9351f574f0b1a4bad2b88f2627ab188ac1522e92 CRs-fixed: 2444954
This commit is contained in:
parent
f4553e1de0
commit
aa95ca27f8
4 changed files with 20 additions and 7 deletions
|
@ -79,6 +79,7 @@ const loc_param_s_type ContextBase::mGps_conf_table[] =
|
|||
{"CONSTRAINED_TIME_UNCERTAINTY_ENERGY_BUDGET", &mGps_conf.CONSTRAINED_TIME_UNCERTAINTY_ENERGY_BUDGET, NULL, 'n'},
|
||||
{"POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED", &mGps_conf.POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED, NULL, 'n'},
|
||||
{"PROXY_APP_PACKAGE_NAME", &mGps_conf.PROXY_APP_PACKAGE_NAME, NULL, 's' },
|
||||
{"CP_MTLR_ES", &mGps_conf.CP_MTLR_ES, NULL, 'n' },
|
||||
};
|
||||
|
||||
const loc_param_s_type ContextBase::mSap_conf_table[] =
|
||||
|
@ -112,7 +113,8 @@ void ContextBase::readConfig()
|
|||
mGps_conf.GPS_LOCK = GNSS_CONFIG_GPS_LOCK_MO_AND_NI;
|
||||
mGps_conf.SUPL_VER = 0x10000;
|
||||
mGps_conf.SUPL_MODE = 0x1;
|
||||
mGps_conf.SUPL_ES = 1;
|
||||
mGps_conf.SUPL_ES = 0;
|
||||
mGps_conf.CP_MTLR_ES = 0;
|
||||
mGps_conf.SUPL_HOST[0] = 0;
|
||||
mGps_conf.SUPL_PORT = 0;
|
||||
mGps_conf.CAPABILITIES = 0x7;
|
||||
|
|
|
@ -72,6 +72,7 @@ typedef struct loc_gps_cfg_s
|
|||
uint32_t CONSTRAINED_TIME_UNCERTAINTY_ENERGY_BUDGET;
|
||||
uint32_t POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED;
|
||||
char PROXY_APP_PACKAGE_NAME[LOC_MAX_PARAM_STRING];
|
||||
uint32_t CP_MTLR_ES;
|
||||
} loc_gps_cfg_s_type;
|
||||
|
||||
/* NOTE: the implementaiton of the parser casts number
|
||||
|
|
|
@ -288,3 +288,9 @@ MODEM_TYPE = 1
|
|||
# This is a string that is sent to the framework
|
||||
# in nfwNotifyCb callback
|
||||
PROXY_APP_PACKAGE_NAME = com.google.android.carrierlocation
|
||||
|
||||
#####################################
|
||||
# CP_MTLR_ES
|
||||
#####################################
|
||||
# CP MTLR ES, 1=enable, 0=disable
|
||||
CP_MTLR_ES=0
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue