Promotion of location.lnx.2.0-00011.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 1026702 Idbc086b938ded02ba702ea080ded69e9b4761e46 Enable/disable PDN for emergency SUPL at runtime 1024879 I566725d5db9b3abdbd9a423b86c10b819217f4f6 making SUPL ES run time configurable 974312 If664a6dc90a993171ca1221f074ecc1ecd06a106 LPPe feature support. 1026576 Ie04fb388dab5f217f2fa520a5276dcffa5962e10 make Api ctor non public Change-Id: I1c72649bf3bd85e9b8dbb652d3effacf8b729d89 CRs-Fixed: 1024879, 1026576, 974312, 1026702
This commit is contained in:
commit
1a77ac4a20
13 changed files with 219 additions and 69 deletions
|
@ -47,17 +47,20 @@ typedef struct loc_gps_cfg_s
|
||||||
uint32_t ACCURACY_THRES;
|
uint32_t ACCURACY_THRES;
|
||||||
uint32_t SUPL_VER;
|
uint32_t SUPL_VER;
|
||||||
uint32_t SUPL_MODE;
|
uint32_t SUPL_MODE;
|
||||||
|
uint32_t SUPL_ES;
|
||||||
uint32_t CAPABILITIES;
|
uint32_t CAPABILITIES;
|
||||||
uint32_t LPP_PROFILE;
|
uint32_t LPP_PROFILE;
|
||||||
uint32_t XTRA_VERSION_CHECK;
|
uint32_t XTRA_VERSION_CHECK;
|
||||||
char XTRA_SERVER_1[MAX_XTRA_SERVER_URL_LENGTH];
|
char XTRA_SERVER_1[MAX_XTRA_SERVER_URL_LENGTH];
|
||||||
char XTRA_SERVER_2[MAX_XTRA_SERVER_URL_LENGTH];
|
char XTRA_SERVER_2[MAX_XTRA_SERVER_URL_LENGTH];
|
||||||
char XTRA_SERVER_3[MAX_XTRA_SERVER_URL_LENGTH];
|
char XTRA_SERVER_3[MAX_XTRA_SERVER_URL_LENGTH];
|
||||||
uint32_t USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL;
|
uint32_t USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL;
|
||||||
uint32_t NMEA_PROVIDER;
|
uint32_t NMEA_PROVIDER;
|
||||||
uint32_t GPS_LOCK;
|
uint32_t GPS_LOCK;
|
||||||
uint32_t A_GLONASS_POS_PROTOCOL_SELECT;
|
uint32_t A_GLONASS_POS_PROTOCOL_SELECT;
|
||||||
uint32_t AGPS_CERT_WRITABLE_MASK;
|
uint32_t AGPS_CERT_WRITABLE_MASK;
|
||||||
|
uint32_t LPPE_CP_TECHNOLOGY;
|
||||||
|
uint32_t LPPE_UP_TECHNOLOGY;
|
||||||
} loc_gps_cfg_s_type;
|
} loc_gps_cfg_s_type;
|
||||||
|
|
||||||
/* NOTE: the implementaiton of the parser casts number
|
/* NOTE: the implementaiton of the parser casts number
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2014,2016 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -78,6 +78,10 @@ public:
|
||||||
mLocApi->updateEvtMask();
|
mLocApi->updateEvtMask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool isFeatureSupported(uint8_t featureVal) {
|
||||||
|
return mLocApi->isFeatureSupported(featureVal);
|
||||||
|
}
|
||||||
|
|
||||||
// This will be overridden by the individual adapters
|
// This will be overridden by the individual adapters
|
||||||
// if necessary.
|
// if necessary.
|
||||||
inline virtual void setUlpProxy(UlpProxyBase* ulp) {
|
inline virtual void setUlpProxy(UlpProxyBase* ulp) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2014,2016 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -132,6 +132,7 @@ LocApiBase::LocApiBase(const MsgTask* msgTask,
|
||||||
mMask(0), mSupportedMsg(0), mContext(context)
|
mMask(0), mSupportedMsg(0), mContext(context)
|
||||||
{
|
{
|
||||||
memset(mLocAdapters, 0, sizeof(mLocAdapters));
|
memset(mLocAdapters, 0, sizeof(mLocAdapters));
|
||||||
|
memset(mFeaturesSupported, 0, sizeof(mFeaturesSupported));
|
||||||
}
|
}
|
||||||
|
|
||||||
LOC_API_ADAPTER_EVENT_MASK_T LocApiBase::getEvtMask()
|
LOC_API_ADAPTER_EVENT_MASK_T LocApiBase::getEvtMask()
|
||||||
|
@ -356,6 +357,11 @@ void LocApiBase::saveSupportedMsgList(uint64_t supportedMsgList)
|
||||||
mSupportedMsg = supportedMsgList;
|
mSupportedMsg = supportedMsgList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LocApiBase::saveSupportedFeatureList(uint8_t *featureList)
|
||||||
|
{
|
||||||
|
memcpy((void *)mFeaturesSupported, (void *)featureList, sizeof(mFeaturesSupported));
|
||||||
|
}
|
||||||
|
|
||||||
void* LocApiBase :: getSibling()
|
void* LocApiBase :: getSibling()
|
||||||
DEFAULT_IMPL(NULL)
|
DEFAULT_IMPL(NULL)
|
||||||
|
|
||||||
|
@ -490,6 +496,10 @@ enum loc_api_adapter_err LocApiBase::
|
||||||
setAGLONASSProtocol(unsigned long aGlonassProtocol)
|
setAGLONASSProtocol(unsigned long aGlonassProtocol)
|
||||||
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
||||||
|
|
||||||
|
enum loc_api_adapter_err LocApiBase::
|
||||||
|
setLPPeProtocol(unsigned long lppeCP, unsigned long lppeUP)
|
||||||
|
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
||||||
|
|
||||||
enum loc_api_adapter_err LocApiBase::
|
enum loc_api_adapter_err LocApiBase::
|
||||||
getWwanZppFix(GpsLocation& zppLoc)
|
getWwanZppFix(GpsLocation& zppLoc)
|
||||||
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
||||||
|
@ -552,4 +562,14 @@ bool LocApiBase::
|
||||||
gnssConstellationConfig()
|
gnssConstellationConfig()
|
||||||
DEFAULT_IMPL(false)
|
DEFAULT_IMPL(false)
|
||||||
|
|
||||||
|
bool LocApiBase::
|
||||||
|
isFeatureSupported(uint8_t featureVal)
|
||||||
|
{
|
||||||
|
uint8_t arrayIndex = featureVal >> 3;
|
||||||
|
uint8_t bitPos = featureVal & 7;
|
||||||
|
|
||||||
|
if (arrayIndex >= MAX_FEATURE_LENGTH) return false;
|
||||||
|
return ((mFeaturesSupported[arrayIndex] >> bitPos ) & 0x1);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace loc_core
|
} // namespace loc_core
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2014, 2016 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -44,6 +44,7 @@ int decodeAddress(char *addr_string, int string_size,
|
||||||
const char *data, int data_size);
|
const char *data, int data_size);
|
||||||
|
|
||||||
#define MAX_ADAPTERS 10
|
#define MAX_ADAPTERS 10
|
||||||
|
#define MAX_FEATURE_LENGTH 100
|
||||||
|
|
||||||
#define TO_ALL_ADAPTERS(adapters, call) \
|
#define TO_ALL_ADAPTERS(adapters, call) \
|
||||||
for (int i = 0; i < MAX_ADAPTERS && NULL != (adapters)[i]; i++) { \
|
for (int i = 0; i < MAX_ADAPTERS && NULL != (adapters)[i]; i++) { \
|
||||||
|
@ -81,6 +82,7 @@ class LocApiBase {
|
||||||
ContextBase *mContext;
|
ContextBase *mContext;
|
||||||
LocAdapterBase* mLocAdapters[MAX_ADAPTERS];
|
LocAdapterBase* mLocAdapters[MAX_ADAPTERS];
|
||||||
uint64_t mSupportedMsg;
|
uint64_t mSupportedMsg;
|
||||||
|
uint8_t mFeaturesSupported[MAX_FEATURE_LENGTH];
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual enum loc_api_adapter_err
|
virtual enum loc_api_adapter_err
|
||||||
|
@ -131,6 +133,7 @@ public:
|
||||||
void requestNiNotify(GpsNiNotification ¬ify, const void* data);
|
void requestNiNotify(GpsNiNotification ¬ify, const void* data);
|
||||||
void saveSupportedMsgList(uint64_t supportedMsgList);
|
void saveSupportedMsgList(uint64_t supportedMsgList);
|
||||||
void reportGnssMeasurementData(GnssData &gnssMeasurementData);
|
void reportGnssMeasurementData(GnssData &gnssMeasurementData);
|
||||||
|
void saveSupportedFeatureList(uint8_t *featureList);
|
||||||
|
|
||||||
// downward calls
|
// downward calls
|
||||||
// All below functions are to be defined by adapter specific modules:
|
// All below functions are to be defined by adapter specific modules:
|
||||||
|
@ -203,6 +206,8 @@ public:
|
||||||
setExtPowerConfig(int isBatteryCharging);
|
setExtPowerConfig(int isBatteryCharging);
|
||||||
virtual enum loc_api_adapter_err
|
virtual enum loc_api_adapter_err
|
||||||
setAGLONASSProtocol(unsigned long aGlonassProtocol);
|
setAGLONASSProtocol(unsigned long aGlonassProtocol);
|
||||||
|
virtual enum loc_api_adapter_err
|
||||||
|
setLPPeProtocol(unsigned long lppeCP, unsigned long lppeUP);
|
||||||
virtual enum loc_api_adapter_err
|
virtual enum loc_api_adapter_err
|
||||||
getWwanZppFix(GpsLocation & zppLoc);
|
getWwanZppFix(GpsLocation & zppLoc);
|
||||||
virtual enum loc_api_adapter_err
|
virtual enum loc_api_adapter_err
|
||||||
|
@ -258,6 +263,11 @@ public:
|
||||||
Check if the modem support the service
|
Check if the modem support the service
|
||||||
*/
|
*/
|
||||||
virtual bool gnssConstellationConfig();
|
virtual bool gnssConstellationConfig();
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check if a feature is supported
|
||||||
|
*/
|
||||||
|
bool isFeatureSupported(uint8_t featureVal);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef LocApiBase* (getLocApi_t)(const MsgTask* msgTask,
|
typedef LocApiBase* (getLocApi_t)(const MsgTask* msgTask,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2013-2015, 2016 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -87,6 +87,11 @@ enum loc_registration_mask_status {
|
||||||
LOC_REGISTRATION_MASK_DISABLED
|
LOC_REGISTRATION_MASK_DISABLED
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
LOC_SUPPORTED_FEATURE_ODCPI_2_V02 = 0, /**< Support ODCPI version 2 feature */
|
||||||
|
LOC_SUPPORTED_FEATURE_WIFI_AP_DATA_INJECT_2_V02 /**< Support Wifi AP data inject version 2 feature */
|
||||||
|
} loc_supported_feature_enum;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/** set to sizeof(UlpLocation) */
|
/** set to sizeof(UlpLocation) */
|
||||||
size_t size;
|
size_t size;
|
||||||
|
@ -170,14 +175,14 @@ typedef struct {
|
||||||
} AGpsExtCallbacks;
|
} AGpsExtCallbacks;
|
||||||
|
|
||||||
|
|
||||||
|
typedef void (*loc_ni_notify_callback)(GpsNiNotification *notification, bool esEnalbed);
|
||||||
/** GPS NI callback structure. */
|
/** GPS NI callback structure. */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Sends the notification request from HAL to GPSLocationProvider.
|
* Sends the notification request from HAL to GPSLocationProvider.
|
||||||
*/
|
*/
|
||||||
gps_ni_notify_callback notify_cb;
|
loc_ni_notify_callback notify_cb;
|
||||||
gps_create_thread create_thread_cb;
|
|
||||||
} GpsNiExtCallbacks;
|
} GpsNiExtCallbacks;
|
||||||
|
|
||||||
typedef enum loc_server_type {
|
typedef enum loc_server_type {
|
||||||
|
|
14
etc/gps.conf
14
etc/gps.conf
|
@ -109,3 +109,17 @@ SGLTE_TARGET=0
|
||||||
# 0x2: RRLP UPlane
|
# 0x2: RRLP UPlane
|
||||||
# 0x4: LLP Uplane
|
# 0x4: LLP Uplane
|
||||||
A_GLONASS_POS_PROTOCOL_SELECT = 0
|
A_GLONASS_POS_PROTOCOL_SELECT = 0
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
# Select technology for LPPe Control Plane
|
||||||
|
##################################################
|
||||||
|
# 0x1: DBH for LPPe CP
|
||||||
|
# 0x2: WLAN AP Measurements for LPPe CP
|
||||||
|
LPPE_CP_TECHNOLOGY = 0
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
# Select technology for LPPe User Plane
|
||||||
|
##################################################
|
||||||
|
# 0x1: DBH for LPPe UP
|
||||||
|
# 0x2: WLAN AP Measurements for LPPe UP
|
||||||
|
LPPE_UP_TECHNOLOGY = 0
|
||||||
|
|
|
@ -67,9 +67,11 @@ protected:
|
||||||
open(LOC_API_ADAPTER_EVENT_MASK_T mask);
|
open(LOC_API_ADAPTER_EVENT_MASK_T mask);
|
||||||
virtual enum loc_api_adapter_err
|
virtual enum loc_api_adapter_err
|
||||||
close();
|
close();
|
||||||
|
LocApiRpc(const MsgTask* msgTask,
|
||||||
|
LOC_API_ADAPTER_EVENT_MASK_T exMask);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LocApiRpc(const MsgTask* msgTask,
|
static LocApiRpc* createLocApiRpc(const MsgTask* msgTask,
|
||||||
LOC_API_ADAPTER_EVENT_MASK_T exMask);
|
LOC_API_ADAPTER_EVENT_MASK_T exMask);
|
||||||
~LocApiRpc();
|
~LocApiRpc();
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,17 @@ const rpc_loc_event_mask_type LocApiRpc::locBits[] =
|
||||||
RPC_LOC_EVENT_WPS_NEEDED_REQUEST
|
RPC_LOC_EVENT_WPS_NEEDED_REQUEST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
LocApiRpc*
|
||||||
|
LocApiRpc::createLocApiRpc(const MsgTask* msgTask,
|
||||||
|
LOC_API_ADAPTER_EVENT_MASK_T exMask,
|
||||||
|
ContextBase* context)
|
||||||
|
{
|
||||||
|
if (NULL == msgTask) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return new LocApiRpc(msgTask, exMask, context);
|
||||||
|
}
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
LocApiRpc::LocApiRpc(const MsgTask* msgTask,
|
LocApiRpc::LocApiRpc(const MsgTask* msgTask,
|
||||||
LOC_API_ADAPTER_EVENT_MASK_T exMask,
|
LOC_API_ADAPTER_EVENT_MASK_T exMask,
|
||||||
|
|
|
@ -239,6 +239,11 @@ public:
|
||||||
{
|
{
|
||||||
return mLocApi->setAGLONASSProtocol(aGlonassProtocol);
|
return mLocApi->setAGLONASSProtocol(aGlonassProtocol);
|
||||||
}
|
}
|
||||||
|
inline virtual enum loc_api_adapter_err
|
||||||
|
setLPPeProtocol(unsigned long lppeCP, unsigned long lppeUP)
|
||||||
|
{
|
||||||
|
return mLocApi->setLPPeProtocol(lppeCP, lppeUP);
|
||||||
|
}
|
||||||
inline virtual int initDataServiceClient()
|
inline virtual int initDataServiceClient()
|
||||||
{
|
{
|
||||||
return mLocApi->initDataServiceClient();
|
return mLocApi->initDataServiceClient();
|
||||||
|
|
|
@ -52,9 +52,15 @@ using namespace loc_core;
|
||||||
//Globals defns
|
//Globals defns
|
||||||
static gps_location_callback gps_loc_cb = NULL;
|
static gps_location_callback gps_loc_cb = NULL;
|
||||||
static gps_sv_status_callback gps_sv_cb = NULL;
|
static gps_sv_status_callback gps_sv_cb = NULL;
|
||||||
|
static gps_ni_notify_callback gps_ni_cb = NULL;
|
||||||
|
|
||||||
static void local_loc_cb(UlpLocation* location, void* locExt);
|
static void local_loc_cb(UlpLocation* location, void* locExt);
|
||||||
static void local_sv_cb(GpsSvStatus* sv_status, void* svExt);
|
static void local_sv_cb(GpsSvStatus* sv_status, void* svExt);
|
||||||
|
static void local_ni_cb(GpsNiNotification *notification, bool esEnalbed);
|
||||||
|
|
||||||
|
GpsNiExtCallbacks sGpsNiExtCallbacks = {
|
||||||
|
local_ni_cb
|
||||||
|
};
|
||||||
|
|
||||||
static const GpsGeofencingInterface* get_geofence_interface(void);
|
static const GpsGeofencingInterface* get_geofence_interface(void);
|
||||||
|
|
||||||
|
@ -967,7 +973,8 @@ SIDE EFFECTS
|
||||||
void loc_ni_init(GpsNiCallbacks *callbacks)
|
void loc_ni_init(GpsNiCallbacks *callbacks)
|
||||||
{
|
{
|
||||||
ENTRY_LOG();
|
ENTRY_LOG();
|
||||||
loc_eng_ni_init(loc_afw_data,(GpsNiExtCallbacks*) callbacks);
|
gps_ni_cb = callbacks->notify_cb;
|
||||||
|
loc_eng_ni_init(loc_afw_data, &sGpsNiExtCallbacks);
|
||||||
EXIT_LOG(%s, VOID_RET);
|
EXIT_LOG(%s, VOID_RET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1082,3 +1089,10 @@ static void local_sv_cb(GpsSvStatus* sv_status, void* svExt)
|
||||||
EXIT_LOG(%s, VOID_RET);
|
EXIT_LOG(%s, VOID_RET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void local_ni_cb(GpsNiNotification *notification, bool esEnalbed)
|
||||||
|
{
|
||||||
|
if (NULL != gps_ni_cb) {
|
||||||
|
gps_ni_cb(notification);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,11 @@ static const loc_param_s_type gps_conf_table[] =
|
||||||
{"SUPL_VER", &gps_conf.SUPL_VER, NULL, 'n'},
|
{"SUPL_VER", &gps_conf.SUPL_VER, NULL, 'n'},
|
||||||
{"LPP_PROFILE", &gps_conf.LPP_PROFILE, NULL, 'n'},
|
{"LPP_PROFILE", &gps_conf.LPP_PROFILE, NULL, 'n'},
|
||||||
{"A_GLONASS_POS_PROTOCOL_SELECT", &gps_conf.A_GLONASS_POS_PROTOCOL_SELECT, NULL, 'n'},
|
{"A_GLONASS_POS_PROTOCOL_SELECT", &gps_conf.A_GLONASS_POS_PROTOCOL_SELECT, NULL, 'n'},
|
||||||
|
{"LPPE_CP_TECHNOLOGY", &gps_conf.LPPE_CP_TECHNOLOGY, NULL, 'n'},
|
||||||
|
{"LPPE_UP_TECHNOLOGY", &gps_conf.LPPE_UP_TECHNOLOGY, NULL, 'n'},
|
||||||
{"AGPS_CERT_WRITABLE_MASK", &gps_conf.AGPS_CERT_WRITABLE_MASK, NULL, 'n'},
|
{"AGPS_CERT_WRITABLE_MASK", &gps_conf.AGPS_CERT_WRITABLE_MASK, NULL, 'n'},
|
||||||
{"SUPL_MODE", &gps_conf.SUPL_MODE, NULL, 'n'},
|
{"SUPL_MODE", &gps_conf.SUPL_MODE, NULL, 'n'},
|
||||||
|
{"SUPL_ES", &gps_conf.SUPL_ES, NULL, 'n'},
|
||||||
{"INTERMEDIATE_POS", &gps_conf.INTERMEDIATE_POS, NULL, 'n'},
|
{"INTERMEDIATE_POS", &gps_conf.INTERMEDIATE_POS, NULL, 'n'},
|
||||||
{"ACCURACY_THRES", &gps_conf.ACCURACY_THRES, NULL, 'n'},
|
{"ACCURACY_THRES", &gps_conf.ACCURACY_THRES, NULL, 'n'},
|
||||||
{"NMEA_PROVIDER", &gps_conf.NMEA_PROVIDER, NULL, 'n'},
|
{"NMEA_PROVIDER", &gps_conf.NMEA_PROVIDER, NULL, 'n'},
|
||||||
|
@ -129,6 +132,7 @@ static void loc_default_parameters(void)
|
||||||
gps_conf.GPS_LOCK = 0;
|
gps_conf.GPS_LOCK = 0;
|
||||||
gps_conf.SUPL_VER = 0x10000;
|
gps_conf.SUPL_VER = 0x10000;
|
||||||
gps_conf.SUPL_MODE = 0x3;
|
gps_conf.SUPL_MODE = 0x3;
|
||||||
|
gps_conf.SUPL_ES = 0;
|
||||||
gps_conf.CAPABILITIES = 0x7;
|
gps_conf.CAPABILITIES = 0x7;
|
||||||
/* LTE Positioning Profile configuration is disable by default*/
|
/* LTE Positioning Profile configuration is disable by default*/
|
||||||
gps_conf.LPP_PROFILE = 0;
|
gps_conf.LPP_PROFILE = 0;
|
||||||
|
@ -138,6 +142,10 @@ static void loc_default_parameters(void)
|
||||||
gps_conf.XTRA_VERSION_CHECK=0;
|
gps_conf.XTRA_VERSION_CHECK=0;
|
||||||
/*Use emergency PDN by default*/
|
/*Use emergency PDN by default*/
|
||||||
gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL = 1;
|
gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL = 1;
|
||||||
|
/* By default no LPPe CP technology is enabled*/
|
||||||
|
gps_conf.LPPE_CP_TECHNOLOGY = 0;
|
||||||
|
/* By default no LPPe UP technology is enabled*/
|
||||||
|
gps_conf.LPPE_UP_TECHNOLOGY = 0;
|
||||||
|
|
||||||
/*Defaults for sap.conf*/
|
/*Defaults for sap.conf*/
|
||||||
sap_conf.GYRO_BIAS_RANDOM_WALK = 0;
|
sap_conf.GYRO_BIAS_RANDOM_WALK = 0;
|
||||||
|
@ -194,6 +202,7 @@ static int loc_eng_get_zpp_handler(loc_eng_data_s_type &loc_eng_data);
|
||||||
static void deleteAidingData(loc_eng_data_s_type &logEng);
|
static void deleteAidingData(loc_eng_data_s_type &logEng);
|
||||||
static AgpsStateMachine*
|
static AgpsStateMachine*
|
||||||
getAgpsStateMachine(loc_eng_data_s_type& logEng, AGpsExtType agpsType);
|
getAgpsStateMachine(loc_eng_data_s_type& logEng, AGpsExtType agpsType);
|
||||||
|
static void createAgnssNifs(loc_eng_data_s_type& locEng);
|
||||||
static int dataCallCb(void *cb_data);
|
static int dataCallCb(void *cb_data);
|
||||||
static void update_aiding_data_for_deletion(loc_eng_data_s_type& loc_eng_data) {
|
static void update_aiding_data_for_deletion(loc_eng_data_s_type& loc_eng_data) {
|
||||||
if (loc_eng_data.engine_status != GPS_STATUS_ENGINE_ON &&
|
if (loc_eng_data.engine_status != GPS_STATUS_ENGINE_ON &&
|
||||||
|
@ -456,6 +465,29 @@ struct LocEngAGlonassProtocol : public LocMsg {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct LocEngLPPeProtocol : public LocMsg {
|
||||||
|
LocEngAdapter* mAdapter;
|
||||||
|
const unsigned long mLPPeCP;
|
||||||
|
const unsigned long mLPPeUP;
|
||||||
|
inline LocEngLPPeProtocol(LocEngAdapter* adapter,
|
||||||
|
unsigned long lppeCP, unsigned long lppeUP) :
|
||||||
|
LocMsg(), mAdapter(adapter), mLPPeCP(lppeCP), mLPPeUP(lppeUP)
|
||||||
|
{
|
||||||
|
locallog();
|
||||||
|
}
|
||||||
|
inline virtual void proc() const {
|
||||||
|
mAdapter->setLPPeProtocol(mLPPeCP, mLPPeUP);
|
||||||
|
}
|
||||||
|
inline void locallog() const {
|
||||||
|
LOC_LOGV("LPPe CP: 0x%lx LPPe UP: 0x%1x", mLPPeCP, mLPPeUP);
|
||||||
|
}
|
||||||
|
inline virtual void log() const {
|
||||||
|
locallog();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// case LOC_ENG_MSG_SUPL_VERSION:
|
// case LOC_ENG_MSG_SUPL_VERSION:
|
||||||
struct LocEngSuplVer : public LocMsg {
|
struct LocEngSuplVer : public LocMsg {
|
||||||
LocEngAdapter* mAdapter;
|
LocEngAdapter* mAdapter;
|
||||||
|
@ -1100,7 +1132,7 @@ LocEngRequestSuplEs::LocEngRequestSuplEs(void* locEng, int id) :
|
||||||
}
|
}
|
||||||
void LocEngRequestSuplEs::proc() const {
|
void LocEngRequestSuplEs::proc() const {
|
||||||
loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
|
loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
|
||||||
if (locEng->ds_nif) {
|
if (locEng->ds_nif && gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL) {
|
||||||
AgpsStateMachine* sm = locEng->ds_nif;
|
AgpsStateMachine* sm = locEng->ds_nif;
|
||||||
DSSubscriber s(sm, mID);
|
DSSubscriber s(sm, mID);
|
||||||
sm->subscribeRsrc((Subscriber*)&s);
|
sm->subscribeRsrc((Subscriber*)&s);
|
||||||
|
@ -1442,16 +1474,18 @@ struct LocEngInit : public LocMsg {
|
||||||
|
|
||||||
// case LOC_ENG_MSG_ATL_OPEN_SUCCESS:
|
// case LOC_ENG_MSG_ATL_OPEN_SUCCESS:
|
||||||
struct LocEngAtlOpenSuccess : public LocMsg {
|
struct LocEngAtlOpenSuccess : public LocMsg {
|
||||||
AgpsStateMachine* mStateMachine;
|
loc_eng_data_s_type* mLocEng;
|
||||||
|
const AGpsExtType mAgpsType;
|
||||||
const int mLen;
|
const int mLen;
|
||||||
char* mAPN;
|
char* mAPN;
|
||||||
const AGpsBearerType mBearerType;
|
const AGpsBearerType mBearerType;
|
||||||
inline LocEngAtlOpenSuccess(AgpsStateMachine* statemachine,
|
inline LocEngAtlOpenSuccess(loc_eng_data_s_type* locEng,
|
||||||
|
const AGpsExtType agpsType,
|
||||||
const char* name,
|
const char* name,
|
||||||
int len,
|
int len,
|
||||||
AGpsBearerType btype) :
|
AGpsBearerType btype) :
|
||||||
LocMsg(),
|
LocMsg(),
|
||||||
mStateMachine(statemachine), mLen(len),
|
mLocEng(locEng), mAgpsType(agpsType), mLen(len),
|
||||||
mAPN(new char[len+1]), mBearerType(btype)
|
mAPN(new char[len+1]), mBearerType(btype)
|
||||||
{
|
{
|
||||||
memcpy((void*)mAPN, (void*)name, len);
|
memcpy((void*)mAPN, (void*)name, len);
|
||||||
|
@ -1463,14 +1497,15 @@ struct LocEngAtlOpenSuccess : public LocMsg {
|
||||||
delete[] mAPN;
|
delete[] mAPN;
|
||||||
}
|
}
|
||||||
inline virtual void proc() const {
|
inline virtual void proc() const {
|
||||||
mStateMachine->setBearer(mBearerType);
|
AgpsStateMachine* sm = getAgpsStateMachine(*mLocEng, mAgpsType);
|
||||||
mStateMachine->setAPN(mAPN, mLen);
|
sm->setBearer(mBearerType);
|
||||||
mStateMachine->onRsrcEvent(RSRC_GRANTED);
|
sm->setAPN(mAPN, mLen);
|
||||||
|
sm->onRsrcEvent(RSRC_GRANTED);
|
||||||
}
|
}
|
||||||
inline void locallog() const {
|
inline void locallog() const {
|
||||||
LOC_LOGV("LocEngAtlOpenSuccess agps type: %s\n apn: %s\n"
|
LOC_LOGV("LocEngAtlOpenSuccess agps type: %s\n apn: %s\n"
|
||||||
" bearer type: %s",
|
" bearer type: %s",
|
||||||
loc_get_agps_type_name(mStateMachine->getType()),
|
loc_get_agps_type_name(mAgpsType),
|
||||||
mAPN,
|
mAPN,
|
||||||
loc_get_agps_bear_name(mBearerType));
|
loc_get_agps_bear_name(mBearerType));
|
||||||
}
|
}
|
||||||
|
@ -1481,13 +1516,16 @@ struct LocEngAtlOpenSuccess : public LocMsg {
|
||||||
|
|
||||||
// case LOC_ENG_MSG_ATL_CLOSED:
|
// case LOC_ENG_MSG_ATL_CLOSED:
|
||||||
struct LocEngAtlClosed : public LocMsg {
|
struct LocEngAtlClosed : public LocMsg {
|
||||||
AgpsStateMachine* mStateMachine;
|
loc_eng_data_s_type* mLocEng;
|
||||||
inline LocEngAtlClosed(AgpsStateMachine* statemachine) :
|
const AGpsExtType mAgpsType;
|
||||||
LocMsg(), mStateMachine(statemachine) {
|
inline LocEngAtlClosed(loc_eng_data_s_type* locEng,
|
||||||
|
const AGpsExtType agpsType) :
|
||||||
|
LocMsg(), mLocEng(locEng), mAgpsType(agpsType) {
|
||||||
locallog();
|
locallog();
|
||||||
}
|
}
|
||||||
inline virtual void proc() const {
|
inline virtual void proc() const {
|
||||||
mStateMachine->onRsrcEvent(RSRC_RELEASED);
|
AgpsStateMachine* sm = getAgpsStateMachine(*mLocEng, mAgpsType);
|
||||||
|
sm->onRsrcEvent(RSRC_RELEASED);
|
||||||
}
|
}
|
||||||
inline void locallog() const {
|
inline void locallog() const {
|
||||||
LOC_LOGV("LocEngAtlClosed");
|
LOC_LOGV("LocEngAtlClosed");
|
||||||
|
@ -1499,13 +1537,16 @@ struct LocEngAtlClosed : public LocMsg {
|
||||||
|
|
||||||
// case LOC_ENG_MSG_ATL_OPEN_FAILED:
|
// case LOC_ENG_MSG_ATL_OPEN_FAILED:
|
||||||
struct LocEngAtlOpenFailed : public LocMsg {
|
struct LocEngAtlOpenFailed : public LocMsg {
|
||||||
AgpsStateMachine* mStateMachine;
|
loc_eng_data_s_type* mLocEng;
|
||||||
inline LocEngAtlOpenFailed(AgpsStateMachine* statemachine) :
|
const AGpsExtType mAgpsType;
|
||||||
LocMsg(), mStateMachine(statemachine) {
|
inline LocEngAtlOpenFailed(loc_eng_data_s_type* locEng,
|
||||||
|
const AGpsExtType agpsType) :
|
||||||
|
LocMsg(), mLocEng(locEng), mAgpsType(agpsType) {
|
||||||
locallog();
|
locallog();
|
||||||
}
|
}
|
||||||
inline virtual void proc() const {
|
inline virtual void proc() const {
|
||||||
mStateMachine->onRsrcEvent(RSRC_DENIED);
|
AgpsStateMachine* sm = getAgpsStateMachine(*mLocEng, mAgpsType);
|
||||||
|
sm->onRsrcEvent(RSRC_DENIED);
|
||||||
}
|
}
|
||||||
inline void locallog() const {
|
inline void locallog() const {
|
||||||
LOC_LOGV("LocEngAtlOpenFailed");
|
LOC_LOGV("LocEngAtlOpenFailed");
|
||||||
|
@ -1547,22 +1588,17 @@ inline void LocEngUp::log() const {
|
||||||
locallog();
|
locallog();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct LocEngDataClientInit : public LocMsg {
|
struct LocEngAgnssNifInit : public LocMsg {
|
||||||
loc_eng_data_s_type* mLocEng;
|
loc_eng_data_s_type* mLocEng;
|
||||||
inline LocEngDataClientInit(loc_eng_data_s_type* locEng) :
|
inline LocEngAgnssNifInit(loc_eng_data_s_type* locEng) :
|
||||||
LocMsg(), mLocEng(locEng) {
|
LocMsg(), mLocEng(locEng) {
|
||||||
locallog();
|
locallog();
|
||||||
}
|
}
|
||||||
virtual void proc() const {
|
virtual void proc() const {
|
||||||
loc_eng_data_s_type *locEng = (loc_eng_data_s_type *)mLocEng;
|
createAgnssNifs(*mLocEng);
|
||||||
if(!locEng->adapter->initDataServiceClient()) {
|
|
||||||
locEng->ds_nif = new DSStateMachine(servicerTypeExt,
|
|
||||||
(void *)dataCallCb,
|
|
||||||
locEng->adapter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
void locallog() const {
|
void locallog() const {
|
||||||
LOC_LOGV("LocEngDataClientInit\n");
|
LOC_LOGV("LocEngAgnssNifInit\n");
|
||||||
}
|
}
|
||||||
virtual void log() const {
|
virtual void log() const {
|
||||||
locallog();
|
locallog();
|
||||||
|
@ -1826,6 +1862,8 @@ static int loc_eng_reinit(loc_eng_data_s_type &loc_eng_data)
|
||||||
adapter->sendMsg(new LocEngSensorControlConfig(adapter, sap_conf.SENSOR_USAGE,
|
adapter->sendMsg(new LocEngSensorControlConfig(adapter, sap_conf.SENSOR_USAGE,
|
||||||
sap_conf.SENSOR_PROVIDER));
|
sap_conf.SENSOR_PROVIDER));
|
||||||
adapter->sendMsg(new LocEngAGlonassProtocol(adapter, gps_conf.A_GLONASS_POS_PROTOCOL_SELECT));
|
adapter->sendMsg(new LocEngAGlonassProtocol(adapter, gps_conf.A_GLONASS_POS_PROTOCOL_SELECT));
|
||||||
|
adapter->sendMsg(new LocEngLPPeProtocol(adapter, gps_conf.LPPE_CP_TECHNOLOGY,
|
||||||
|
gps_conf.LPPE_UP_TECHNOLOGY));
|
||||||
|
|
||||||
if (!loc_eng_data.generateNmea)
|
if (!loc_eng_data.generateNmea)
|
||||||
{
|
{
|
||||||
|
@ -2336,31 +2374,14 @@ void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsExtCallbacks* call
|
||||||
EXIT_LOG(%s, VOID_RET);
|
EXIT_LOG(%s, VOID_RET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
bool agpsCapable = ((gps_conf.CAPABILITIES & GPS_CAPABILITY_MSA) ||
|
||||||
|
(gps_conf.CAPABILITIES & GPS_CAPABILITY_MSB));
|
||||||
LocEngAdapter* adapter = loc_eng_data.adapter;
|
LocEngAdapter* adapter = loc_eng_data.adapter;
|
||||||
loc_eng_data.agps_status_cb = callbacks->status_cb;
|
loc_eng_data.agps_status_cb = callbacks->status_cb;
|
||||||
|
|
||||||
loc_eng_data.internet_nif = new AgpsStateMachine(servicerTypeAgps,
|
if (agpsCapable && NULL != adapter) {
|
||||||
(void *)loc_eng_data.agps_status_cb,
|
|
||||||
AGPS_TYPE_WWAN_ANY,
|
|
||||||
false);
|
|
||||||
loc_eng_data.wifi_nif = new AgpsStateMachine(servicerTypeAgps,
|
|
||||||
(void *)loc_eng_data.agps_status_cb,
|
|
||||||
AGPS_TYPE_WIFI,
|
|
||||||
true);
|
|
||||||
|
|
||||||
if ((gps_conf.CAPABILITIES & GPS_CAPABILITY_MSA) ||
|
|
||||||
(gps_conf.CAPABILITIES & GPS_CAPABILITY_MSB)) {
|
|
||||||
loc_eng_data.agnss_nif = new AgpsStateMachine(servicerTypeAgps,
|
|
||||||
(void *)loc_eng_data.agps_status_cb,
|
|
||||||
AGPS_TYPE_SUPL,
|
|
||||||
false);
|
|
||||||
|
|
||||||
if (adapter->mSupportsAgpsRequests) {
|
if (adapter->mSupportsAgpsRequests) {
|
||||||
if(gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL) {
|
adapter->sendMsg(new LocEngAgnssNifInit(&loc_eng_data));
|
||||||
loc_eng_data.adapter->sendMsg(new LocEngDataClientInit(&loc_eng_data));
|
|
||||||
}
|
|
||||||
loc_eng_dmn_conn_loc_api_server_launch(callbacks->create_thread_cb,
|
|
||||||
NULL, NULL, &loc_eng_data);
|
|
||||||
}
|
}
|
||||||
loc_eng_agps_reinit(loc_eng_data);
|
loc_eng_agps_reinit(loc_eng_data);
|
||||||
}
|
}
|
||||||
|
@ -2376,6 +2397,35 @@ static void deleteAidingData(loc_eng_data_s_type &logEng) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// must be called under msg handler context
|
||||||
|
static void createAgnssNifs(loc_eng_data_s_type& locEng) {
|
||||||
|
bool agpsCapable = ((gps_conf.CAPABILITIES & GPS_CAPABILITY_MSA) ||
|
||||||
|
(gps_conf.CAPABILITIES & GPS_CAPABILITY_MSB));
|
||||||
|
LocEngAdapter* adapter = locEng.adapter;
|
||||||
|
if (agpsCapable && NULL != adapter && adapter->mSupportsAgpsRequests) {
|
||||||
|
if (NULL == locEng.internet_nif) {
|
||||||
|
locEng.internet_nif= new AgpsStateMachine(servicerTypeAgps,
|
||||||
|
(void *)locEng.agps_status_cb,
|
||||||
|
AGPS_TYPE_WWAN_ANY,
|
||||||
|
false);
|
||||||
|
}
|
||||||
|
if (NULL == locEng.agnss_nif) {
|
||||||
|
locEng.agnss_nif = new AgpsStateMachine(servicerTypeAgps,
|
||||||
|
(void *)locEng.agps_status_cb,
|
||||||
|
AGPS_TYPE_SUPL,
|
||||||
|
false);
|
||||||
|
}
|
||||||
|
if (NULL == locEng.ds_nif &&
|
||||||
|
gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL &&
|
||||||
|
0 == adapter->initDataServiceClient()) {
|
||||||
|
locEng.ds_nif = new DSStateMachine(servicerTypeExt,
|
||||||
|
(void *)dataCallCb,
|
||||||
|
locEng.adapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// must be called under msg handler context
|
||||||
static AgpsStateMachine*
|
static AgpsStateMachine*
|
||||||
getAgpsStateMachine(loc_eng_data_s_type &locEng, AGpsExtType agpsType) {
|
getAgpsStateMachine(loc_eng_data_s_type &locEng, AGpsExtType agpsType) {
|
||||||
AgpsStateMachine* stateMachine;
|
AgpsStateMachine* stateMachine;
|
||||||
|
@ -2390,9 +2440,14 @@ getAgpsStateMachine(loc_eng_data_s_type &locEng, AGpsExtType agpsType) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AGPS_TYPE_SUPL_ES: {
|
case AGPS_TYPE_SUPL_ES: {
|
||||||
locEng.ds_nif ?
|
if (gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL) {
|
||||||
stateMachine = locEng.ds_nif:
|
if (NULL == locEng.ds_nif) {
|
||||||
|
createAgnssNifs(locEng);
|
||||||
|
}
|
||||||
|
stateMachine = locEng.ds_nif;
|
||||||
|
} else {
|
||||||
stateMachine = locEng.agnss_nif;
|
stateMachine = locEng.agnss_nif;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -2434,10 +2489,9 @@ int loc_eng_agps_open(loc_eng_data_s_type &loc_eng_data, AGpsExtType agpsType,
|
||||||
LOC_LOGD("loc_eng_agps_open APN name = [%s]", apn);
|
LOC_LOGD("loc_eng_agps_open APN name = [%s]", apn);
|
||||||
|
|
||||||
int apn_len = smaller_of(strlen (apn), MAX_APN_LEN);
|
int apn_len = smaller_of(strlen (apn), MAX_APN_LEN);
|
||||||
AgpsStateMachine* sm = getAgpsStateMachine(loc_eng_data, agpsType);
|
|
||||||
|
|
||||||
loc_eng_data.adapter->sendMsg(
|
loc_eng_data.adapter->sendMsg(
|
||||||
new LocEngAtlOpenSuccess(sm, apn, apn_len, bearerType));
|
new LocEngAtlOpenSuccess(&loc_eng_data, agpsType,
|
||||||
|
apn, apn_len, bearerType));
|
||||||
|
|
||||||
EXIT_LOG(%d, 0);
|
EXIT_LOG(%d, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2466,8 +2520,8 @@ int loc_eng_agps_closed(loc_eng_data_s_type &loc_eng_data, AGpsExtType agpsType)
|
||||||
INIT_CHECK(loc_eng_data.adapter && loc_eng_data.agps_status_cb,
|
INIT_CHECK(loc_eng_data.adapter && loc_eng_data.agps_status_cb,
|
||||||
return -1);
|
return -1);
|
||||||
|
|
||||||
AgpsStateMachine* sm = getAgpsStateMachine(loc_eng_data, agpsType);
|
loc_eng_data.adapter->sendMsg(new LocEngAtlClosed(&loc_eng_data,
|
||||||
loc_eng_data.adapter->sendMsg(new LocEngAtlClosed(sm));
|
agpsType));
|
||||||
|
|
||||||
EXIT_LOG(%d, 0);
|
EXIT_LOG(%d, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2496,8 +2550,8 @@ int loc_eng_agps_open_failed(loc_eng_data_s_type &loc_eng_data, AGpsExtType agps
|
||||||
INIT_CHECK(loc_eng_data.adapter && loc_eng_data.agps_status_cb,
|
INIT_CHECK(loc_eng_data.adapter && loc_eng_data.agps_status_cb,
|
||||||
return -1);
|
return -1);
|
||||||
|
|
||||||
AgpsStateMachine* sm = getAgpsStateMachine(loc_eng_data, agpsType);
|
loc_eng_data.adapter->sendMsg(new LocEngAtlOpenFailed(&loc_eng_data,
|
||||||
loc_eng_data.adapter->sendMsg(new LocEngAtlOpenFailed(sm));
|
agpsType));
|
||||||
|
|
||||||
EXIT_LOG(%d, 0);
|
EXIT_LOG(%d, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2773,13 +2827,20 @@ void loc_eng_configuration_update (loc_eng_data_s_type &loc_eng_data,
|
||||||
if (gps_conf_tmp.SUPL_MODE != gps_conf.SUPL_MODE) {
|
if (gps_conf_tmp.SUPL_MODE != gps_conf.SUPL_MODE) {
|
||||||
adapter->sendMsg(new LocEngSuplMode(adapter->getUlpProxy()));
|
adapter->sendMsg(new LocEngSuplMode(adapter->getUlpProxy()));
|
||||||
}
|
}
|
||||||
|
// we always update lock mask, this is because if this is dsds device, we would not
|
||||||
|
// know if modem has switched dds, if so, lock mask may also need to be updated.
|
||||||
|
// if we have power vote, HAL is on, lock mask 0; else gps_conf.GPS_LOCK.
|
||||||
|
adapter->setGpsLockMsg(adapter->getPowerVote() ? 0 : gps_conf.GPS_LOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
gps_conf_tmp.SUPL_VER = gps_conf.SUPL_VER;
|
gps_conf_tmp.SUPL_VER = gps_conf.SUPL_VER;
|
||||||
gps_conf_tmp.LPP_PROFILE = gps_conf.LPP_PROFILE;
|
gps_conf_tmp.LPP_PROFILE = gps_conf.LPP_PROFILE;
|
||||||
gps_conf_tmp.A_GLONASS_POS_PROTOCOL_SELECT = gps_conf.A_GLONASS_POS_PROTOCOL_SELECT;
|
gps_conf_tmp.A_GLONASS_POS_PROTOCOL_SELECT = gps_conf.A_GLONASS_POS_PROTOCOL_SELECT;
|
||||||
gps_conf_tmp.SUPL_MODE = gps_conf.SUPL_MODE;
|
gps_conf_tmp.SUPL_MODE = gps_conf.SUPL_MODE;
|
||||||
|
gps_conf_tmp.SUPL_ES = gps_conf.SUPL_ES;
|
||||||
gps_conf_tmp.GPS_LOCK = gps_conf.GPS_LOCK;
|
gps_conf_tmp.GPS_LOCK = gps_conf.GPS_LOCK;
|
||||||
|
gps_conf_tmp.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL =
|
||||||
|
gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL;
|
||||||
gps_conf = gps_conf_tmp;
|
gps_conf = gps_conf_tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2009-2014, 2016 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -89,7 +89,7 @@ typedef struct loc_eng_data_s
|
||||||
loc_sv_status_cb_ext sv_status_cb;
|
loc_sv_status_cb_ext sv_status_cb;
|
||||||
agps_status_extended agps_status_cb;
|
agps_status_extended agps_status_cb;
|
||||||
gps_nmea_callback nmea_cb;
|
gps_nmea_callback nmea_cb;
|
||||||
gps_ni_notify_callback ni_notify_cb;
|
loc_ni_notify_callback ni_notify_cb;
|
||||||
gps_set_capabilities set_capabilities_cb;
|
gps_set_capabilities set_capabilities_cb;
|
||||||
gps_acquire_wakelock acquire_wakelock_cb;
|
gps_acquire_wakelock acquire_wakelock_cb;
|
||||||
gps_release_wakelock release_wakelock_cb;
|
gps_release_wakelock release_wakelock_cb;
|
||||||
|
@ -142,6 +142,7 @@ typedef struct loc_eng_data_s
|
||||||
loc_ext_parser sv_ext_parser;
|
loc_ext_parser sv_ext_parser;
|
||||||
} loc_eng_data_s_type;
|
} loc_eng_data_s_type;
|
||||||
|
|
||||||
|
|
||||||
//loc_eng functions
|
//loc_eng functions
|
||||||
int loc_eng_init(loc_eng_data_s_type &loc_eng_data,
|
int loc_eng_init(loc_eng_data_s_type &loc_eng_data,
|
||||||
LocCallbacks* callbacks,
|
LocCallbacks* callbacks,
|
||||||
|
|
|
@ -188,7 +188,7 @@ void loc_eng_ni_request_handler(loc_eng_data_s_type &loc_eng_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
CALLBACK_LOG_CALLFLOW("ni_notify_cb - id", %d, notif->notification_id);
|
CALLBACK_LOG_CALLFLOW("ni_notify_cb - id", %d, notif->notification_id);
|
||||||
loc_eng_data.ni_notify_cb((GpsNiNotification*)notif);
|
loc_eng_data.ni_notify_cb((GpsNiNotification*)notif, gps_conf.SUPL_ES != 0);
|
||||||
}
|
}
|
||||||
EXIT_LOG(%s, VOID_RET);
|
EXIT_LOG(%s, VOID_RET);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue