Commit graph

3998 commits

Author SHA1 Message Date
Linux Build Service Account
7fc64a6c2f Merge "another potential race condition" 2015-10-03 21:37:27 -07:00
Linux Build Service Account
e8c149a153 Merge "Opt out of clang till issues are fixed" 2015-10-03 09:38:13 -07:00
Kevin Tang
8da6427472 Add AP Timestamp for coarse/fine time to position reports
Change to add APTimestamp field to position reports to carry
Coarse or fine timestamp.

Change-Id: Iaf5490cb991865d4b6376b0934b306a31528d90c
2015-09-30 23:22:37 -07:00
Kevin Tang
9b3aa46ebb another potential race condition
LocTimer on timeout would currently delete timer delegate.
This meddles into the management of LocTimer::stop() call,
and the order of obj delete needs to be synchronized in a
few different places as a result.

This change lets the delete of the timer delegate obj fold
into the stop() handling, which would be easier to synch.

Change-Id: Ic3e0b3d183dceb9e6e2db4c47ec9d6e296b0c3f6
CRs-Fixed: 916590
2015-09-30 14:03:36 -07:00
Linux Build Service Account
f75c6e0f7b Merge "Fix for Cppcheck warnings" 2015-09-24 21:35:41 -07:00
Linux Build Service Account
9f830f906d Merge "Add 3 new fields in GPS and FLP pipe" 2015-09-24 21:35:40 -07:00
Aravind Asam
68104bd701 Opt out of clang till issues are fixed
Needed for moving to clang

Change-Id: I5922c62cb2f6efc297120c5a359c92a82260f3a7
2015-09-24 16:30:36 -07:00
Linux Build Service Account
bd034a21f2 Merge "Sending FLP fixes to ULP" 2015-09-24 05:12:57 -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
Jiafei Wen
bf80dfb9e9 Add 3 new fields in GPS and FLP pipe
To support next version of GTP AP protocol,
this change adds the support for the below
3 fields in GPS pipe and FLP pipe :
  1). heading_unc
  2). horizontal_reliability
  3). vertical_reliability

Change-Id: If51c38f9159f372c2b2c12fbb55d123958cfee95
CRs-Fixed: 898876
2015-09-23 18:01:06 -07:00
Linux Build Service Account
30173edcf2 Merge "Crash fix with MsgTask API change" 2015-09-23 01:53:49 -07:00
Jiafei Wen
eb01e397ed Sending FLP fixes to ULP
For crowd sourcing, FLP HAL needs to share
with ULP the flp fixes in real time. This
change is making FLP HAL to send flp fixes
to ULP.

Change-Id: I1a852ec69db8eb50de5c18b03205d1b488cfd4b0
CRs-fixed: 874928 878064
2015-09-22 22:37:57 -07:00
Linux Build Service Account
c40ded235a Merge "Set SUPL_ES to 0 in gps.conf" 2015-09-22 15:33:58 -07:00
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
Linux Build Service Account
049cc84d3a Merge "timer bug fix" 2015-09-19 15:13:48 -07:00
Kevin Tang
088a127c31 timer bug fix
when a ticking timer is stopped, currently kernel doesn't
get updated with the next immediate timer's interval. As a
result, kernel timer will expire sooner (with the stopped
timer's interval), and the next timer's client is notified
for this expiration.

Change-Id: I0d67d1418cb9bfe7f70ae71252901d4c6bb699b3
CRs-Fixed: 909776
2015-09-18 09:30:33 -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
Linux Build Service Account
c1021a05dc Merge "fixing a crash vulnerability due to race condition" 2015-09-11 07:24:11 -07:00
Kevin Tang
9957a19f5f fixing a crash vulnerability due to race condition
LocTimer::stop() can be called from different threads, which must
be protected. Currently there is a race condition between back to
back stop()'s or expire() + stop() events.

Change-Id: Iae80b78f049a32da87639f813c6f5126b4ccd072
CRs-Fixed: 904627
2015-09-09 10:06:50 -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
Bhavna Sharma
5e77108972 Fix for timerfd_create on older kernel revisions
BOOTTIME_ALARM and BOOTTIME were added to timerfd_create
in kernel version 3.11 and 3.15 respectively.
But for targets still on older kernel version we fallback on MONOTONIC.

CRs-Fixed: 897805

Change-Id: I47d9780d69ce5ee8c183c84baa93ea3c1a00db57
2015-08-27 10:29:54 -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
Linux Build Service Account
082ad3c25d Merge "Move the flp definitions to gps-noship" 2015-08-21 08:44:22 -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
ethan.kim
eb925647d5 Set SUPL_ES to 0 in gps.conf
Disabled checking for emergency to accept SUPL

CRs-fixed: 860504

Change-Id: Iad1605242daf8fa1d6bcce3e69caff7811d9843a
2015-08-18 09:03:18 -07:00
Tushar Janefalkar
cc9f8dc03b Add new event mask for timezone.
Modem sends this event to request for
injection of timezone and offset from
UTC

Change-Id: I664db892bf08f7df9680322405df4c38198cb465
CRs-fixed: 868532
2015-08-17 14:07:29 -07:00
Linux Build Service Account
95fbf27ce1 Merge "NMEA generation change to prevent 2Hz reporting" 2015-08-16 18:07:30 -07:00
Linux Build Service Account
7b819b2b03 Merge "Clear passing up memory for LocApiBase function" 2015-08-13 20:06:26 -07:00
Kevin Tang
898c646a7c crash in LocTimer wrapper
LocTimerWrapper implements loc_timer_start/stop calls for backward
compatibility. There is a race condtiion where the wrapper object
could be deleted by the client thread and expireation handling at
rough the same time, which would have the memory freed twice. Now
they are mutext protected.

Change-Id: I25d7466db88a840a8a09e7a476cface48c91d22e
2015-08-10 10:33:49 -07:00
Linux Build Service Account
277f3e30a3 Merge "LocTimer repeated expiration" 2015-08-09 12:02:14 -07:00
Qiang Chen
923698ad8a Clear passing up memory for LocApiBase function
GpsLocation object need to be cleared in case
the base calss member function being called so
that no bad values will be passed up.

Change-Id: I224ecebb3e4137c1baddd99ce0211a0f60d3e5b4
CRs-fixed: 879356
2015-08-06 18:27:07 -07:00
Kevin Tang
9de97acc86 LocTimer repeated expiration
Timer must be removed from epoll as soon as it expires,
otherwise it continuously expire. Current timer removes
from a different thread, this triggers repeated expire
events until the maintain thread gets to remove it.

Change-Id: Ie523bce5069416521d49bc0178d2cad2dd1f04da
CRs-Fixed: 870568
2015-08-04 15:03:32 -07:00
Neethu Joseph
50ae85852a MsgTask thread must call associator function always
All instances of MsgTask were not calling associator
because of a use of a static variable check.
All instance of MsgTask thread must call the associator.

CRs-Fixed: 870450

Change-Id: I18314ec3ca0fe21f4bbd12a505bf552e64e25307
2015-08-04 14:59:48 -07:00
Kevin Tang
bb5d2d4bfb Adding a number of utilities
LocHeap, LocThread, LocTimer, and moved MsgTask to
utils. Also added are LocRankable and LocRunnable
abstract classes.

Change-Id: I76975455d24f2c84a95dcc1b04f79fea562ea5ba
CRs-Fixed: 855222
2015-08-04 14:29:48 -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
509979c395 Remove DeleteAidingData additions
The additions of more Satellite types that
require gps.h changes are removed.

Change-Id: Ib0ab285af7b9bee886c5f7a256d638f2fd7fee9d
2015-08-03 04:18:40 -07:00
Dante Russo
d0faf18e26 Remove DeleteAidingData additions
The additions of more Satellite types that
require gps.h changes are removed.

Change-Id: Ib0ab285af7b9bee886c5f7a256d638f2fd7fee9d
2015-07-16 10:08:11 -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
1b07337c5a LCA additions to ULP and log_util defines.
1. Add two new ulp location sources (PIP and NLP)
ULP_LOCATION_IS_FROM_NLP to mark locations from NLP
ULP_LOCATION_IS_FROM_PIP to mark locations from PIP
2. Introduce a macro for printing exit log with error

CRs-Fixed: 694343

Change-Id: Ifa11803df2ed4fc249a5c339acfeeb5d89bf55d5
2015-07-16 10:07:13 -07:00
Linux Build Service Account
e768ded5ed Merge "Fix implicit declaration errors in gps hal." into private_m_master 2015-07-15 05:01:32 -07:00
Dante Russo
fb8732c9f5 Add compile flag to disable unsupported features.
Allows compilation on builds that have no support
for certain features

Change-Id: I067bcf88432d74b49e60eaab86409f178cf45e7d
2015-07-15 15:22:08 +05:30
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
Dante Russo
d33d216267 Add feature set configuration
Some features are flagged out builds
because of a lack of support.

Change-Id: I067bcf88432d74b49e60eaab86409f178cf45e7d
2015-07-13 19:25:58 +05:30
Dante Russo
db7fc90da2 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-13 19:25:38 +05:30
Dante Russo
8834b304c9 Fix implicit declaration errors in gps hal
Including string.h and stdlib.h to fix compiler
errors.

Change-Id: I4e79c71b9e5691e51850adcc52f52b36f8e3d088
2015-07-13 19:25:13 +05:30
Dante Russo
447fe95020 LCA additions to ULP and log_util defines
1. Add two new ulp location sources (PIP and NLP)
ULP_LOCATION_IS_FROM_NLP to mark locations from NLP
ULP_LOCATION_IS_FROM_PIP to mark locations from PIP
2. Introduce a macro for printing exit log with error.

CRs-Fixed: 694343

Change-Id: Ifa11803df2ed4fc249a5c339acfeeb5d89bf55d5
2015-07-13 19:24:44 +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