Commit graph

98 commits

Author SHA1 Message Date
Vamana Murthi
35877af173 Merge remote-tracking branch 'origin/location.lnx.1.0-rel.1.0' into HEAD
git merge upto CRT tag location.lnx.1.0-00036 to private_n_location.lnx

Change-Id: I922daaa9a8c2745095ec9d425192d3649657e76c
CRs-Fixed: 1015000
2016-05-12 18:11:31 -07:00
Madhanraj Chelladurai
edc2a648b3 gps: include support to check hardware type property
automotive platform introduced a new android property called
ro.hardware.type to detect automotive platform for the
purpose of having automotive specific features.

Added changes in loc_target to detect auto platform.

Change-Id: Ib886b96b2e95dafc151bead041e5fc3d6740c468
CRs-Fixed: 992647
2016-04-27 23:43:17 -07:00
Kevin Tang
f41f1960c4 fixing a LE compilation issue
missing include of a head file. A late check in for Android introduced
this. This blocks LE mainline switching to component model.

Change-Id: Idc93f1ec9b1ccb548d3119e72ce0e3e797f2039f
CRs-Fixed: 1004488
2016-04-17 12:42:19 -07:00
Ruifeng Xu
d4c4fbf56b XTRA Client 2.0
This project implemented XTRA "Enhancements" grouped as XTRA Client 2.0.
1. Added NTP_SERVER config into gps.conf
2. Removed XTRA Client 2.0 Phase 1 code changes
3. Disabled public api to delete aiding data in user build

CRs-fixed: 917950
Change-Id: I18b31da74c9fe0c24d0ced3770f099197ad32d9a
2016-04-15 16:10:34 -07:00
Saurabh Srivastava
5573c31749 Adding fix for KW warning
Fix for buffer overflow possibility for the thread name passed in to
pthread_setname_np() method.

Change-Id: Id323dd058eddcf50d6fd9ec8908e9997b30c561b
CRs-Fixed: 999457
2016-04-08 03:25:02 -07:00
Naresh Munagala
8f54f693ee Fix LA compilation issues after merge
Fixed compilation issues for LA after merging
oe_master with location.lnx.1.0-dev.1.0.

Change-Id: I7940429c369249ab9aa636fe9850c1281cf2dc01
CRs-Fixed: 995520
2016-04-06 09:48:43 -07:00
Kevin Tang
1fbe5b2ff4 Merge commit 'refs/changes/97/1557997/2' into HEAD
Change-Id: I89b9c1e262dcd249589b507449d0921d1aabf3e5
CRs-Fixed: 995520
2016-04-06 09:47:14 -07:00
Madhanraj Chelladurai
c4c29c3ca7 gps: consider nsec while ranking the timer objects
We need to consider nsec as well while ranking timer objects

Change-Id: Ieaad5dfa80b26b90e998618b3cbe1e590fc00839
CRs-Fixed: 991345
2016-03-31 10:25:22 -07:00
Saurabh Srivastava
217e754489 Enabling CLANG compilation and fixing all resulting errors
Removing statement to set LOCAL_CLANG flag explicity to
true. It will be true by default.

Change-Id: I2eaba5a89e64088e3383b962dceaaa7e975e997a
CRs-Fixed: 989476
2016-03-17 12:33:17 +05:30
Deven Patel
285d395703 Revert "Revert "Fix compilation issues for m_master merge into oe_master"."
This reverts commit fa7a874eb0

Change-Id: Id2415d80fa3cbdc124e0a3bdd2722db7f233ad53
2016-03-15 12:20:25 -07:00
Deven Patel
a376de4826 Revert "Revert "Merging m_master changes to oe_master"."
This reverts commit a29688ff34

Change-Id: Iab525a58ddb6a00e119afe19f4f51b07b7f428f2
2016-03-15 12:20:01 -07:00
Deven Patel
a29688ff34 Revert "Merging m_master changes to oe_master".
This reverts commit 1aeb6bad84

Change-Id: Iec0a96e7cdfe55ef5836c92a2ae1cce407f6cd5e
2016-03-07 10:55:20 -08:00
Deven Patel
fa7a874eb0 Revert "Fix compilation issues for m_master merge into oe_master".
This reverts commit ecb67363ee

Change-Id: I7b540247b246ea4caf710247d2c58b55515dae7c
2016-03-07 10:52:46 -08:00
Kevin Tang
a05f77fa0b make LocSharedLock::mRef ops atomic
The current share() and drop() calls are not thread
safe, which can cause memory heap correuption. This
changes the read / write ops to be atomic.

Change-Id: Ic241d4573bdf2e58c4e264e97bd41b56f882c791
CRs-Fixed: 975372
2016-03-02 21:45:22 -08:00
Kevin Tang
411951c341 make LocSharedLock::mRef ops atomic
The current share() and drop() calls are not thread
safe, which can cause memory heap correuption. This
changes the read / write ops to be atomic.

Change-Id: Ic241d4573bdf2e58c4e264e97bd41b56f882c791
CRs-Fixed: 975372
2016-02-19 12:38:43 -08:00
Kevin Tang
ecb67363ee Fix compilation issues for m_master merge into oe_master
Fixed compilation issues for M upgrade

Change-Id: I602aa7c8a2db9682a1fe94b7ca892027281deec7
2016-02-04 10:06:28 -08:00
Kevin Tang
1aeb6bad84 Merging m_master changes to oe_master
Merging LA m_master changes to oe_master

merge head - 89f41a9b16

Change-Id: I9010487f1d6f3d2e30a568b441bc5f9b719a0fb1
2016-02-04 10:03:40 -08:00
Linux Build Service Account
f7ae18656c Merge "Location: reduce memory footprint" 2015-11-12 09:33: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
Bhavna Sharma
c9a243bc15 Move some debug logs to verbose.
While it is important to continue to log events
at debug level logs, logging all data may not be
as important. Moving such logs to verbose level

CRs-Fixed: 936031

Change-Id: I634d173b645180d55d620a24cce2c31aee966b8f
2015-11-06 20:42:13 -08:00
Kevin Tang
0b4a33bc45 missing util header file
causing the unit test builds failure.

Change-Id: Id65290c0198904eda020b566e6636b0bb772aa1d
2015-10-09 16:10:40 -07:00
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
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
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
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
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
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
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
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
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
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
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
Qaing Chen
634c1bb8bd Fix Memory leak in util/loc_cfg.cpp
deallocate conf_copy after usage.

Change-Id: I8ad4e4e8007a2d8b608f3f74503515f062b86c4b
CRs-fixed: 852809
2015-06-11 17:51:35 -07:00
Tushar Janefalkar
7d367d0e62 Add utility to identify lean targets
This utility reads ro.lean system property
and returns a 1 if the property is set to true
and returns 0 otherwise.

Change-Id: I52a8396ee085d44b90d8416131f27b0b1a46575e
CRs-fixed: 801990
2015-03-19 17:33:06 -07:00
sudarsanarao makupalli
1fe602a0a9 Avoiding race conditions during the pallellized builds in Android system
Removed relative paths and set Absolute paths in Android.mk file
and moved corresponding files to right location

Change-Id: Iacf2ee3dadb3e87c9354c1c4b8003cd8cc65ea97
CRs-Fixed: 714112
2015-03-09 11:55:44 -07:00
Ashish Dhiman
b45b1606db Klockwork P1 issues.
fixing Klockwork P1 issues.

CRs-Fixed: 793601
Change-Id: I037c17c342f473d6d21a234ec1e980ba55b98cbe
2015-02-10 13:47:14 +05:30
Tushar Janefalkar
b38580ee75 Revert "Added Detection Logic For QMI_PDS Target."
This reverts commit fb9c641bb8.

CRs-Fixed: 760272
Change-Id: I90a9bcd77447dc5b3d799bd0ad1bdbfae85cef15
2015-01-26 16:23:43 -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
Dongmei Wang
836bdc4386 loc-pla: Create Platform Library Abstraction layer
Defined PLA functions to enable gps libraries to call
platform-dependent library calls transparantly. Removed
fake files and replaced the fake function with defined
PLA functions.

CRs-fixed: 605817

Change-Id: I677f658001329a10ef9b49bd963631a83fb4c85f
2014-12-05 15:15:33 -08:00
Dongmei Wang
3e16bc32b5 Make off-target loc hal libraries built
CRs-fixed: 605821

Change-Id: I334ccf21f6e5d045d32c718cb060c67e167be733
2014-12-04 23:09:20 -08:00
Dongmei Wang
91ece00117 loc-hal:porting from ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.040
It contains the following changes:
- porting from AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.040
- updated package loc-api files according to the merge
- rename loc-api to loc-hal
- dynamically load liblbs_core.so.1 file for LE platforms
- print a warning message when loading the lbs_core library fails

CRs-fixed: 605821

Change-Id: I54e1a9c742d1734ffa29e6864901119e0ee600c8
2014-12-04 23:07:12 -08:00
Ekta Shah
fba6dcd31f gps: Remove dependency on libcutils.so
Change-Id: Id3d6e2c81eb6d5ee549236c591cc75ac32aa948b
2014-12-02 12:58:26 -08:00
Pandari Sabhapathi
b83679bfc9 loc_api_v02: Updating to loc api v02 idl Major:0x02, Minor:0x14
Renames elapsed_millis_since_boot.cpp to platform_lib_time.cpp.
Fixed Klockwork null pointer dereference errors.

CRs-fixed: 476773

Change-Id: I8c05bb3ab6fdd3ec80d7fe3427160b2e29d7a0d0
2014-12-02 12:58:19 -08:00