diff options
author | dianlujitao <dianlujitao@gmail.com> | 2016-12-03 13:16:43 +0800 |
---|---|---|
committer | davidevinavil <davidevinavil@gmail.com> | 2017-01-21 18:29:00 +0100 |
commit | 6818ac6afaa76a95c469707f5c1ddcfead73a634 (patch) | |
tree | aae17ef2c085c3e51b60b0c41abbd7960ff4d191 /gps | |
parent | 7155dfe063ba2c220da76a3894d00ddabdc39d90 (diff) |
z2_plus: Update GPS HAL from upstream
* Tag: LA.UM.5.5.r1-01300-8x96.0
Change-Id: I269ec7f9809531139e157220feed9a2c977a7d6c
Diffstat (limited to 'gps')
-rw-r--r-- | gps/Makefile.am | 4 | ||||
-rw-r--r-- | gps/configure.ac | 24 | ||||
-rw-r--r-- | gps/loc-api.pc.in | 10 | ||||
-rw-r--r-- | gps/loc-hal.pc.in | 10 | ||||
-rw-r--r-- | gps/loc_api/libloc_api_50001/loc_eng.cpp | 51 | ||||
-rw-r--r-- | gps/loc_api/libloc_api_50001/loc_eng.h | 1 |
6 files changed, 49 insertions, 51 deletions
diff --git a/gps/Makefile.am b/gps/Makefile.am index f374a5c..3b4b595 100644 --- a/gps/Makefile.am +++ b/gps/Makefile.am @@ -3,8 +3,8 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = utils loc_api/libloc_api_50001 loc_api/loc_api_v02 +SUBDIRS = utils core loc_api pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = loc-api.pc +pkgconfig_DATA = loc-hal.pc EXTRA_DIST = $(pkgconfig_DATA) diff --git a/gps/configure.ac b/gps/configure.ac index dca18a1..4ef39ee 100644 --- a/gps/configure.ac +++ b/gps/configure.ac @@ -1,11 +1,11 @@ -# configure.ac -- Autoconf script for gps loc_api +# configure.ac -- Autoconf script for gps loc_hal # # Process this file with autoconf to produce a configure script # Requires autoconf tool later than 2.61 AC_PREREQ(2.61) -# Initialize the gps loc_api package version 1.0.0 -AC_INIT([loc-api],1.0.0) +# Initialize the gps loc-hal package version 1.0.0 +AC_INIT([loc-hal],1.0.0) # Does not strictly follow GNU Coding standards AM_INIT_AUTOMAKE([foreign]) # Disables auto rebuilding of configure, Makefile.ins @@ -29,10 +29,22 @@ AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG # Checks for libraries. +PKG_CHECK_MODULES([QMI], [qmi]) +AC_SUBST([QMI_CFLAGS]) +AC_SUBST([QMI_LIBS]) + PKG_CHECK_MODULES([QMIF], [qmi-framework]) AC_SUBST([QMIF_CFLAGS]) AC_SUBST([QMIF_LIBS]) +PKG_CHECK_MODULES([DATA], [data]) +AC_SUBST([DATA_CFLAGS]) +AC_SUBST([DATA_LIBS]) + +PKG_CHECK_MODULES([LOCPLA], [loc-pla]) +AC_SUBST([LOCPLA_CFLAGS]) +AC_SUBST([LOCPLA_LIBS]) + AC_ARG_WITH([libhardware_includes], AC_HELP_STRING([--with-libhardware-includes=@<:@dir@:>@], [Specify the location of the libhardware headers]), @@ -77,9 +89,9 @@ AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") AC_CONFIG_FILES([ \ Makefile \ utils/Makefile \ - loc_api/libloc_api_50001/Makefile \ - loc_api/loc_api_v02/Makefile \ - loc-api.pc \ + core/Makefile \ + loc_api/Makefile \ + loc-hal.pc \ ]) AC_OUTPUT diff --git a/gps/loc-api.pc.in b/gps/loc-api.pc.in deleted file mode 100644 index 3b4f81b..0000000 --- a/gps/loc-api.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: loc-api -Description: Qualcomm GPS Location API -Version: @VERSION@ -Libs: -L${libdir} -lgps_utils_so -lloc_adapter_so -lloc_eng_so -lgps_default_so -lloc_api -Cflags: -I${includedir}/loc-api/libloc_api_50001 -I${includedir}/loc-api/utils -I${includedir}/ -I${includedir}/loc-api diff --git a/gps/loc-hal.pc.in b/gps/loc-hal.pc.in new file mode 100644 index 0000000..36cd4e7 --- /dev/null +++ b/gps/loc-hal.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: loc-hal +Description: QTI GPS Loc HAL +Version: @VERSION +Libs: -L${libdir} -lgps_utils_so -lloc_core -lloc_eng_so -lgps_default_so -lloc_ds_api -lloc_api_v02 +Cflags: -I${includedir} -I${includedir}/loc-hal/utils -I${includedir}/loc-hal/core -I${includedir}/loc-hal diff --git a/gps/loc_api/libloc_api_50001/loc_eng.cpp b/gps/loc_api/libloc_api_50001/loc_eng.cpp index c1cc640..318786d 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng.cpp +++ b/gps/loc_api/libloc_api_50001/loc_eng.cpp @@ -1248,16 +1248,7 @@ LocEngReqRelWifi::~LocEngReqRelWifi() { } void LocEngReqRelWifi::proc() const { loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng; - if (locEng->wifi_nif) { - WIFISubscriber s(locEng->wifi_nif, mSSID, mPassword, mSenderId); - if (mIsReq) { - locEng->wifi_nif->subscribeRsrc((Subscriber*)&s); - } else { - locEng->wifi_nif->unsubscribeRsrc((Subscriber*)&s); - } - } else { - locEng->adapter->atlOpenStatus(mSenderId, 0, NULL, -1, mType); - } + locEng->adapter->atlOpenStatus(mSenderId, 0, NULL, -1, mType); } inline void LocEngReqRelWifi::locallog() const { LOC_LOGV("%s - senderId: %d, ssid: %s, password: %s", @@ -2024,7 +2015,6 @@ static int loc_eng_stop_handler(loc_eng_data_s_type &loc_eng_data) int ret_val = LOC_API_ADAPTER_ERR_SUCCESS; if (loc_eng_data.adapter->isInSession()) { - ret_val = loc_eng_data.adapter->stopFix(); loc_eng_data.adapter->setInSession(FALSE); } @@ -2346,12 +2336,10 @@ void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsExtCallbacks* call EXIT_LOG(%s, VOID_RET); return; } - bool agpsCapable = ((gps_conf.CAPABILITIES & GPS_CAPABILITY_MSA) || - (gps_conf.CAPABILITIES & GPS_CAPABILITY_MSB)); LocEngAdapter* adapter = loc_eng_data.adapter; loc_eng_data.agps_status_cb = callbacks->status_cb; - if (agpsCapable && NULL != adapter) { + if (NULL != adapter) { if (adapter->mSupportsAgpsRequests) { adapter->sendMsg(new LocEngAgnssNifInit(&loc_eng_data)); } @@ -2374,25 +2362,27 @@ 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 != 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); + if (agpsCapable) { + 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); + } } } } @@ -2402,10 +2392,6 @@ static AgpsStateMachine* getAgpsStateMachine(loc_eng_data_s_type &locEng, AGpsExtType agpsType) { AgpsStateMachine* stateMachine; switch (agpsType) { - case AGPS_TYPE_WIFI: { - stateMachine = locEng.wifi_nif; - break; - } case AGPS_TYPE_INVALID: case AGPS_TYPE_SUPL: { stateMachine = locEng.agnss_nif; @@ -2933,8 +2919,9 @@ void loc_eng_handle_engine_up(loc_eng_data_s_type &loc_eng_data) if (loc_eng_data.adapter->isInSession()) { // This sets the copy in adapter to modem loc_eng_data.adapter->setInSession(false); - loc_eng_data.adapter->sendMsg(new LocEngStartFix(loc_eng_data.adapter)); + loc_eng_start_handler(loc_eng_data); } + EXIT_LOG(%s, VOID_RET); } diff --git a/gps/loc_api/libloc_api_50001/loc_eng.h b/gps/loc_api/libloc_api_50001/loc_eng.h index 1ff391a..6deebaa 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng.h +++ b/gps/loc_api/libloc_api_50001/loc_eng.h @@ -105,7 +105,6 @@ typedef struct loc_eng_data_s // AGPS state machines AgpsStateMachine* agnss_nif; AgpsStateMachine* internet_nif; - AgpsStateMachine* wifi_nif; //State machine for Data Services AgpsStateMachine* ds_nif; |