Commit graph

231 commits

Author SHA1 Message Date
Kevin Tang
1c11832352 Sub milli sec part in the relevant NMEA Strings
NMEA Strings should introduce the sub milli sec part in the
relevant NMEA Strings for NHZ Sessions

Change-Id: I9bac4caa26e87741e5e82e16a8047af20ac8012b
CRs-Fixed: 951144
2016-01-06 14:34:30 -08:00
Valeri Atamaniouk
78bb13288e Location: reduce memory footprint
Reduce memory footprint by moving data sets into const
data segments. Update function parameters to accept const
parameters when appropriate.

CRs-fixed: 928770
Change-Id: I42955cf18de2b0541cfaed89359cdcf9ae6fea8a
2015-11-09 11:33:15 +02:00
Dante Russo
9336256027 Add support for new sockaddr_storage struct
In order to handle ipv6 requests, a new struct
is being used instead of an array to store ipv6
info

CRs-Fixed: 817295
Change-Id: I030d4206c01724f08b311697f0bbefb1f9fd10e6
2015-10-07 10:25:06 -07:00
Vamana Murthi
e9e399737b Fix for Cppcheck warnings
Fixed cppcheck warnings reported by customer

Change-Id: Ia6cf5e940d204111d8354f9eec71ac816a142719
CRs-fixed: 901373
2015-09-24 13:34:17 +05:30
Kevin Tang
94ecbf6804 Crash fix with MsgTask API change
Removed tCreate and tAssociate from MsgTask. LocThread
now can optionally take a tCreate method. Associator is
replaced with *firstMsg* option to MsgTask, which is a
more generic option, that can associate or do other set
up job at the create of a MsgTask.

The current MsgTask doesn't use tCreate, which exposes
a slight time window for Location HAL when its MsgTask
is NOT associated to DVM heap but a message delivery to
DVM could be attempted during this time.

Change-Id: Iafd5b91b693baacb9b7064463f8c44f74026f54c
CRs-Fixed: 902350
2015-09-21 14:45:58 -07:00
Ruifeng Xu
9c22ef8bca fixed XTRA bug
The change included the following fixes:
increased buffer size to hold the initial UA string;
use file for saving the initial UA string

Change-Id: I52ef94e57695f1411a34e338e89325de382b09b5
CRs-fixed: 905170
2015-09-11 13:51:26 -07:00
Kevin Tang
623f5a6fc5 adding dev id into xtra user agent
setting XTRA_USER_AGENT at GPS HAL init time, incorporating
Android sw version, manufacturer, model, board.

CRs-Fixed: 788356

Change-Id: I8d9dcc80a0769796a25a0477f5f1598a292fe8b0
2015-09-02 10:09:14 -07:00
Linux Build Service Account
f2f492bd5b Merge "Handle race condition in HAL post SSR" 2015-08-25 08:05:05 -07:00
Linux Build Service Account
5501f7e1a2 Merge "memory management fixes" 2015-08-21 08:44:24 -07:00
Hema Iyer Sankaranarayanan
a50aaae62e Handle race condition in HAL post SSR
Post SSR, ensure necessary config injection is done before restarting
an existing tracking session

Change-Id: I1bec8ff1cab3a9762e73a13958fe91c62f40fb92
CRs-fixed: 888187
2015-08-20 13:18:27 -07:00
Kevin Tang
a38a8b8477 memory management fixes
byte long each, but the loc_set_config_entry() util call
writes an int at a time, causing buffer overflow. #2, in
loc_xtra-init(), a data structure wrap happened without
iniializing the unused data fields.

Change-Id: I96b40a330316927d276840a997082fe759263699
CRs-Fixed: 866937
2015-08-18 17:01:12 -07:00
Jiafei Wen
87b6a3fff4 Move the flp definitions to gps-noship
This change moves those definitions related to FLP form
gps_extented_c.h to gps-noship.

Change-Id: I3da452fa3e885af509199cae9fe1b1f24ff48100
CRs-fixed: 801916
2015-08-18 14:47:47 -07:00
Dante Russo
078314504d NMEA generation change to prevent 2Hz reporting
GPGGA/GPRMC/GPGSA can be reported two times per
second in some cases where we lose all satellite
signals. We should report these NMEA sentences only
from position report to prevent this.

CRs-fixed: 884484

Change-Id: I123d9f074ca725703c6e90397160b701033e22f0
2015-08-04 09:06:47 -07:00
Dante Russo
2572d24770 Move modem power vote out of hal.
The modem power vote feature needs to move
out of hal as it has non-aosp dependency.

CRs-fixed: 831075

Change-Id: Ic83276e9d3c0d125a01f50719102fcd7c0455385
2015-07-16 10:07:49 -07:00
Dante Russo
99606eb414 Fix implicit declaration errors in gps hal.
Including string.h and stdlib.h to fix compiler
errors

Change-Id: I4e79c71b9e5691e51850adcc52f52b36f8e3d088
2015-07-15 15:18:06 +05:30
ethan.kim
1dfdcabc87 Add to check ZPP report condition for NMEA generation
NMEA is supposed to be generated only when GPS tracking
is going on in GPS HAL but it was also observed when
ZPP report, so add a check if isInSession is true to
avoid that.

Change-Id: Ia6152fe78243d45e71adccce956d0a727c3f17a2
2015-06-29 13:18:05 -07:00
Dante Russo
dd823bc93e Add glo and bds to used-in-fix mask
The used-in-fix mask is only keeping track
of GPS SVs, so add a used-in-fix mask for
GlONASS SVs and BDS SVs as well to avoid
NMEA generation issues

CRs-fixed: 826152

Change-Id: I33862cf8d40db1d667179ef68d18703edc359843
2015-06-22 17:43:36 -07:00
Qiang Chen
a26bc76b9c Fix gps.conf capabilities overwrited by carrier
If overwrite happened, loc config update will
restore gps.conf capabilities based on target type.

Change-Id: I958ce8da0e8062549f12808aca4aebcf4a7fb95d
CRs-Fixed: 850144
2015-06-09 05:54:24 -07:00
Dante Russo
9f7f4bd6d2 Remove reporting gps status from loc eng layer
GPS Status is reported from Loc Api layer, so
reporting it in Loc Eng layer in addition is
redundant. Also, SSR should not send engine on
status when not in a session.

Change-Id: I10bc2d112574de0016110e193d6c2cd071b00b2a
CRs-fixed: 826256
2015-04-28 18:08:37 -07:00
Tushar Janefalkar
f4d8e902f7 Fix bug with switch case
The switch case inside setXtraVersionCheck
does not have breaks after the cases and
the default label is misspelled. This
will always cause the check to be disabled

Change-Id: Ibcc3703c98e561e0bdfbcc5c8802d1b45c9a511a
CRs-Fixed: 790623
2015-02-05 02:37:46 -08:00
Linux Build Service Account
ad8e6aef91 Merge "GNSS measurement" 2015-01-17 18:31:02 -08:00
Dante Russo
407848e5cf GNSS measurement
Implementation of GNSS Measurements support.
In GPS HAL, Only GPS Measurements report
will be collected from modem.

CRs-fixed: 771496

Change-Id: Ief4368099df4ff573ad1a764f4156d63685e936d
2015-01-16 13:22:20 -08:00
Linux Build Service Account
511b1ac909 Merge "support reinjecting supl url for sim hot swap" 2015-01-06 01:56:39 -08:00
Linux Build Service Account
4a43e264a5 Merge "gps.conf parameters are in sap.conf table" 2014-12-16 16:33:55 -08:00
Kevin Tang
f311c16b0a gps.conf parameters are in sap.conf table
due to merge issue, some of the parameters to come out
from gps.conf are placed in the table that expects from
sap.conf. Moving them into the right place.

Change-Id: Ice988b06d0d87bdbc0225296898d6aaad701743f
CRs-Fixed: 760152
2014-12-16 11:22:46 -08:00
Kevin Tang
f014665a52 Enable "auto" target for APQ8960 Automotive ADP platform
APQ8960 Automotive platforms use "auto" as a target name
for ro.baseband property. Appropriate GPS driver changes
were,
   1. define GNSS_AUTO enum constant
   2. Enable GNSS drivers for "auto" target.

Change-Id: I463db7ac1c3e2dd6101e457ad723bb16adf5aacb
CRs-Fixed: 771597
2014-12-15 21:21:16 -08:00
Dante Russo
7e9e68a3af support reinjecting supl url for sim hot swap
modem might reset during sim hot swap, in which case
the prior supl url shall be remembered so that can be
reinjected. This change enables it.

CRs-fixed: 771493

Change-Id: I86ec898a54bc8706720c29a1ea67ce27153ee981
2014-12-15 17:49:40 -08:00
Linux Build Service Account
3aa99e9fc5 Merge "Remove Redundant Log" 2014-12-09 20:44:38 -08:00
Jiafei Wen
a328080552 Remove Redundant Log
This change removes redundant log
printing, including SV info and
position report.

Change-Id: Ifcf827f73e6c940e3fcb93402bc7a4b22e9a9d4e
CRs-fixed: 765333
2014-12-02 12:00:51 -08:00
Kevin Tang
1ca544cfb5 SUPL_MODE needs to be factored in for ULP
GpsLocationProvider gets SUPL_MODE, and passes is to
GPS HAL along with other configs upon sim hot swap.
GPS HAL needs to parse it out and factor in that
information in for ULP so that ULP can make correct
decision w.r.t. position mode when gnss positioning
is needed.

Change-Id: I1a14dd9d9e47b5d7ea072ae08ee99bbb7c69dbe0
CRs-Fixed: 749794
2014-11-12 19:02:58 -08:00
Linux Build Service Account
3a6d7924d6 Merge "Merge tag 'AU_LINUX_ANDROID_KK.04.04.04.010.214' into HEAD" 2014-10-23 11:54:25 -07:00
Zhoulu Luo
629d80a82a AU_LINUX_ANDROID_KK.04.04.04.010.214 based on quic/aosp/kk
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlRGYwkACgkQoUgPZYCpAfF2rwCg5quG/L+pzo5R94uD/QSR1Xs6
 mpsAoIxxW/ftz0uMbp67UANrb7EQyVNY
 =eKHq
 -----END PGP SIGNATURE-----

Merge tag 'AU_LINUX_ANDROID_KK.04.04.04.010.214' into HEAD

AU_LINUX_ANDROID_KK.04.04.04.010.214 based on quic/aosp/kk

Change-Id: Ida51fa96a5a39fcb3bb2f2c6ab9be84a3ec44d41
2014-10-22 12:57:59 -07:00
Kevin Tang
ff78fb363c GPS lock is stuck as disabled after post powerup enablement
when the device boots with gps disabled in settings and
later enabled post pwoer up, the lock state doesn't get
updated correctly.

Bug: 16131208

CRs-fixed: 736966
Change-Id: Ice8237a3fd67740819de573ffebbab851363163d
2014-10-20 15:00:48 -07:00
Kevin Tang
d1cc6bfee7 GPS LOCK did not work when NMEA_PROVIDER follows it
there is an implicit requirement on the loc_gps_cfg_s_type field
data type, that is they must be 32 bit fields. Otherwise it would
only work with the assistance of padding. When two adjacent 8 bit
fields are defined, the later filled field would overwrite the
previously written neighbor. This is why GPS_LOCK was tested as
broken in the latest build.

This also fixes a theoretic bug that when there are two of the
same fields defined in the config table to be filled, the
accounting of the filled entries was incorrect earlier. This is
not a realistic bug, as there are no idential entries in the
config table HAL fills.

Bug: 16131208

CRs-fixed: 736966
Change-Id: I2e262fb30272f6f334508df17bb640022d7b1ef5
2014-10-20 15:00:39 -07:00
Kevin Tang
af2762ceca GPS_LOCK configuration support
GPS_LOCK is defined as a bit mask in the higher layer
defined in gps.conf. GPS HAL reads from gps.conf, yet
this can be reconfigured by gps.h defined new API to
a different value. The current value will be used at
cleanup() time, to optionally lock gps modem to the
configured mode.

This changs also sets SUPL URL to NULL if hostname
comes with set_server() API is a NULL string.

Also optimized configuration_update() implementation
so that no all items will go through the reconfigu
scan.

Also added SUPL_MODE as a parameter in gps.conf which
can be uncommented to over-write the value from config.xml.
This can be used for testing purposes

Bug: 16131208
Bug: 17288144

CRs-fixed: 736966
Change-Id: I12a89b12ff82b6efd7b5567d2fcd6a7e79414c71
2014-10-20 15:00:31 -07:00
Kevin Tang
809dec4e92 allow reconfiguration update happen before HAL init
currently HAL does not allow gps paremeter reconfiguration
before HAL init. This change allows that. The new config
items will be cached only. Upon HAL init, the parameters
that interest modem will be injected.

Bug: 17110478
CRs-fixed: 736966

Change-Id: Ie8d180a0ed6a35776f1ee0342f88dfc010ec2746
2014-10-20 15:00:11 -07:00
Kevin Tang
e6a851c191 adding update config post power up
Some of the parameters configured in gps.conf may be
carrier dependent. This provides a mechanism so that
GpsLocationProvider can determine current operator
resolve of the carrier specific configurations and
update HAL with those configurations post init.
Bug: 17110478

CRs-fixed: 736966
Change-Id: I80aa4404da7666824335fee074dae2ffcba40548
2014-10-20 14:54:26 -07:00
Tushar Janefalkar
0b0b89fbd6 Add buffer length check for XTRA data
To prevent reading beyond the length of
the buffer that contains XTRA data, a
check has been introduced assuming an
approximate limit for the size of the
data

Change-Id: I7e05beadec76c3308448b9198fd23c8e8b97394d
CRs-fixed: 420623
2014-10-13 11:06:45 -07:00
Zhoulu Luo
94ca706b3c AU_LINUX_ANDROID_KK.04.04.04.010.182 based on quic/aosp/kk
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlQsxwMACgkQoUgPZYCpAfG54gCdFhi4kcvtS8jo5rRwqMemDRJw
 JZAAoOcZBG/Y1bH/Kmd1+27OQJUOH/Yg
 =fi7/
 -----END PGP SIGNATURE-----

Merge tag 'AU_LINUX_ANDROID_KK.04.04.04.010.182' into HEAD

AU_LINUX_ANDROID_KK.04.04.04.010.182 based on quic/aosp/kk

Conflicts:
	loc_api/libloc_api_50001/loc_eng.h

Change-Id: I3a734e3bdc3347961f1bd4bf5499ec7ca9aecfbc
2014-10-02 14:42:00 -07:00
Zhoulu Luo
49c8a177cb AU_LINUX_ANDROID_KK.04.04.04.010.171 based on quic/aosp/kk
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlQizM8ACgkQoUgPZYCpAfH5yQCgmx8aSsNKN3FRVfYiXQK8Zq7i
 9FkAn0tDuuuy3sib/8fh/S+VCU/l8UKI
 =VC4+
 -----END PGP SIGNATURE-----

Merge tag 'AU_LINUX_ANDROID_KK.04.04.04.010.171' into HEAD

AU_LINUX_ANDROID_KK.04.04.04.010.171 based on quic/aosp/kk

Change-Id: Ieeb7a3b116fd4ac9091582b40de5a9c468ca68ea
2014-09-25 17:58:59 -07:00
Tushar Janefalkar
a55881f51b Use regular ATL callflow for SUPL ES
Added a new gps.conf parameter which can
be used to decide whether or not to use
data services to bring up call using emergency
PDN or use default SUPL PDN

Change-Id: I604a1489e66339eb2c27019dafab640f7a15cd84
CRs-fixed: 685639
2014-09-22 16:49:57 -07:00
Linux Build Service Account
e3900d7339 Merge "Remove reduntant clearing of GpsLocation memory" 2014-09-21 15:49:51 -07:00
Linux Build Service Account
f5f74198b5 Merge "Ignore the first time inject if it is form Afw." 2014-09-20 17:17:07 -07:00
Linux Build Service Account
88740b0a54 Merge "Vote for modem power only on select targets" 2014-09-20 13:38:45 -07:00
Dante Russo
9d0c2d5627 Remove reduntant clearing of GpsLocation memory
GpsLocation memory will now be cleared inside the
Loc Api handler itself, so no need to do it a second
time before calling into the Loc Api handler.

Change-Id: Iec37624621d6eb4806eb8e13c807bb4e40584e39
CRs-fixed: 726800
2014-09-18 17:18:36 -07:00
Zhoulu Luo
9fe51b7593 AU_LINUX_ANDROID_KK.04.04.04.010.161 based on quic/aosp/kk
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlQYPVMACgkQoUgPZYCpAfFH4gCeMO6B2RcmkK4FiGKyMAGyby70
 q1kAoKNW3qC2PpZ2TR02ASrbkjfuyjJv
 =+Hrp
 -----END PGP SIGNATURE-----

Merge tag 'AU_LINUX_ANDROID_KK.04.04.04.010.161' into HEAD

AU_LINUX_ANDROID_KK.04.04.04.010.161 based on quic/aosp/kk

Conflicts:
	loc_api/libloc_api_50001/loc_eng.cpp
	loc_api/libloc_api_50001/loc_eng.h

Change-Id: Ib51f82aa83a2aa7ea63a10efffe5e7eef8a5d135
2014-09-18 12:26:41 -07:00
Jiafei Wen
fab550522a Ignore the first time inject if it is form Afw.
The first time injection is ignored from
an adapter that doesn't support CPI Extended
Capabilities to prevent time from being
injected twice on startup.

CRs-fixed: 720540
Change-Id: If786cf2c750906093f21272aae928e4d9fc4dea8
2014-09-16 18:17:07 -07:00
Tushar Janefalkar
f78f285721 Vote for modem power only on select targets
Since libmdmdetect and peripheral manager
are not available on all targets, added
compilation flags to use these APIs only on
supported targets

Change-Id: I404e3273718dc7f9e6475f5a1d2c2f0b010cb33f
2014-09-14 23:24:22 -07:00
Pandari Sabhapathi
5cef7caea3 Migrating XTRA from gpsonextra.net to cloud based izatcloud.net
*Added logic to remove xtra1.gpsonextra.net from URLs
received from modem.
*Added logic to override modem URLs with those configured
in gps.conf
*Replaced all instances of xtra{1,2,3}.gpsonextra.net domain URLs
in gps.conf with xtrapath{1,2,3}.izatcloud.net URLs.
*Replaced all commented instances of xtra.bin in gps.conf with xtra2.bin.

CRs-fixed: 643816

Change-Id: I803b26bce22f06910dcaa1ee057902b9381667bf
2014-09-11 16:43:11 -07:00
Tushar Janefalkar
8cdb9cac41 Use peripheral mgr to vote for modem power up/down
Peripheral manager APIs are now used to vote
for modem to be powered up when location is enabled
and powered down when location is disabled.
If peripheral manager is not supported, the powerup
node will be opened and closed to vote

CRs-fixed: 655587

Change-Id: I2b865ce1d88bf1a65e3c9b875f24d669579bc61e
2014-08-24 20:11:12 -07:00