Commit graph

294 commits

Author SHA1 Message Date
Dante Russo
65e3760d6d Added FDCL reg mask bit and feature support bit
Also change the reg mask to 64 bit since we now
have more than 32 possible bits.

CRs-fixed: 2129134
Change-Id: I006f5fffac3d9dd2d96ca82d84f49bde96bc0f55
2018-01-09 18:05:42 -08:00
Linux Build Service Account
d519abf0c1 Merge "Replace wall time" 2017-12-25 08:03:44 -08:00
Katz Yamada
99e0f11428 Location Utils - LocIpc class enhancement
Add LocIpcSender class and add an overloaded
send method in LocIpc class that takes binary
data block.

Change-Id: I102f23fe8bf378c3bed5cac0086aa9773c62727b
CRs-Fixed: 2144883
2017-12-18 11:37:24 -08:00
Baili Feng
edcf000435 Replace wall time
Replace gettimeofday with clock_gettime
CRs-fixed: 2144315

Change-Id: Ie8472d2aedcd0e63b86cc5ff100ce9bb28fd670c
2017-12-05 16:59:41 +08:00
Linux Build Service Account
68883097b4 Merge "Location Utils - Improve send method of LocIpc" 2017-11-21 00:24:36 -08:00
Katz Yamada
104f1fee14 Location Utils - Improve send method of LocIpc
Change LocIpc::send() method implementation from
regular member to static, since it does not modify
any of its class member variables. Sender code
should be able to call this method without creating
an instance.

Change-Id: I9d08404c3fae615fd20531904241bf2e246fa592
CRs-Fixed: 2143522
2017-11-16 10:48:11 -08:00
Baili Feng
ccd6716531 Fix $--RMC sentence
Navigational status should be the last element

Change-Id: Ifb201fe95de74e3419e7fe55c55657b41818c64d
CRs-fixed: 2140835
2017-11-09 19:30:14 +08:00
Baili Feng
08cbff337d Adjust NMEA sentence to comply with v4.1
1. Add Navigational status to $--RMC sentence
2. Add Signal ID to $--GSV sentence

Change-Id: I5ae26bed8dcca577ee661a4129858a8482d172a6
CRs-fixed: 2109692
2017-11-07 22:02:11 -08:00
Harikrishnan Hariharan
5f583c6375 Enable logcat logging for location modules in LE
Add support for logcat logging for location modules
in LE, by adding appropriate flags -llog to LDFLAGS.
Update logging macros to use ALOG* so that logs can
be outputed using standard logcat adb commands.

Change-Id: I94b5a1e9f0b4ec78a55e7189002e0f674ef174d2
CRs-Fixed: 2117669
2017-10-16 14:44:36 +05:30
Harikrishnan Hariharan
e22e04dbe2 Fix compilation errors in xtra-daemon for LE.
Fix compilation errors in xtra-daemon in LE for changes made
as part of adding biway IPC communication changes. New files
created are added as part of LE Makefile.

Change-Id: Ic0f0d60dd85eea38bb47753aea4fccfb3070d64c
CRs-Fixed: 2122852
2017-10-07 15:19:19 +05:30
Ruifeng Xu
b0982b4476 add HAL socket
this patch contains the following changes:
1. added header and implemenation files of socket util apis
in libgps.utils; 2. updated XtraSystemStatusObserver to use
the new apis; 3. added HAL socket and new thread to listen to it.

Change-Id: If1f6b4b4d6ea2d03640f68e96f0286300404f42b
CRs-fixed: 2108635
2017-10-05 11:33:37 -07:00
Naresh Munagala
a5c7e2c53d extended gdop parameters in interface files
updated interface files with extended gdop parameters.

Change-Id: Ie31311125e66d26dab4f564be7120fae374b9d2c
CRs-Fixed: 2062856
2017-10-04 22:57:34 -07:00
Baili Feng
f69296ba9e Init default agps status callback in GnssAdapter
Call LocNetIfaceAgps_getStatusCb implemented in libloc_net_iface.so,
use the return function as default agps status callback.

Change-Id: I4d966a888e312c2d0fb1a6c9e30752294876e500
CRs-Fixed: 2064002
2017-09-12 14:16:28 +08:00
Linux Build Service Account
6f104ee746 Merge "Fix to report bearing and speed accuracy" 2017-08-16 02:35:56 -07:00
Baili Feng
4c9c783989 Clean up compiler warning message
CRs-Fixed: 2070597
Change-Id: Ic57f5211a4e4b9112888435d54df7a361bcb6767
2017-08-01 18:17:20 +08:00
Linux Build Service Account
7cc7da646c Merge "Fix 2.9-rel compilation issues on LE" 2017-07-27 03:43:51 -07:00
Bhavna Sharma
686a5c54b0 Location API for Outdoor Trip Batching
Add / Modify Location API for
Outdoor Trip Batching feature.
Introduce a batch mode to differentiate
between routine and outdoor trip mode.

CRs-Fixed: 2041674

Change-Id: Ia8b2d34457b29c4fe754ab24287a6984ab9a96f5
2017-07-24 09:25:07 -07:00
Naresh Munagala
ea051709cd Fix 2.9-rel compilation issues on LE
Change-Id: I35b8da213e8830456c8652802941a418748bd5e9
CRs-Fixed: 2067662
2017-07-21 17:51:05 +05:30
Bhavna Sharma
be7f077122 Fix to report bearing and speed accuracy
1. Validity bit for vertical uncertainity was conflicting
with the validity bit of location source, hence had
to change the bit.
2. Modify ZPP API to report speed and bearing accuracy.

CRs-Fixed:2064017

Change-Id: I8b09ecab3d67557ad7c2451fee71dbc0e1f14371
2017-07-13 15:16:59 -07:00
Linux Build Service Account
619caa5b56 Merge "Disable set debug NMEA bit when unsupported" 2017-07-12 01:57:55 -07:00
Katz Yamada
4971373d94 Disable set debug NMEA bit when unsupported
Avoid setting debug NMEA bit of QMI_LOC_SET_
NMEA_TYPES_REQ message when the feature is
unsupported.

Change-Id: I999654f627eac68042597ee51aff81e8588bfa9b
CRs-Fixed: 2072961
2017-07-11 11:18:17 -07:00
Madhanraj Chelladurai
ea013420db Add QZSS constellation in Gnss_LocSvSystemEnumType
Add QZSS support in Loc SV constellation structure.

Change-Id: I58a989faa8ad4027d9f83fabccd700fa55333ce6
CRs-Fixed: 2053513
2017-07-05 22:25:37 -07:00
Naresh Munagala
f708deaec6 gps time population from GNSS
v2v needs gps time population in izat remote apis

Change-Id: Ibe340a3f834ebe27c552bd1ffe2f20d3b9f50450
CRs-Fixed: 2050993
2017-07-04 21:16:49 -07:00
Linux Build Service Account
7ac8c0331a Merge "Removing header copying to out folder" 2017-07-03 21:13:21 -07:00
Linux Build Service Account
15ae65c5cc Merge "Correct the comment for loc_param_s_type struct" 2017-06-30 23:39:06 -07:00
Yingjie Wang
226e404a8c Correct the comment for loc_param_s_type struct
Change the comment for param_type member of loc_param_s_type
struct:   'f' for float  --> 'f' for double

Change-Id: Ibf9c6bec624bd3900c4b96100c359ed7350becc6
CRs-fixed: 2068995
2017-06-29 14:17:00 +08:00
Dante Russo
dc29f91ec6 Removing header copying to out folder
Replace copying header files to out folder
for use by other modules to instead build
headers into separate libraries that end
with _headers that can be used by other
modules.

Change-Id: I073967cd34e5c79110895908a4eef1b7d17bf9ea
CRs-fixed: 2068129
2017-06-27 17:36:14 -07:00
Linux Build Service Account
1e6d1c02ce Merge "Fixed loc_get_target() and removed 1530 support" 2017-06-26 15:02:24 -07:00
Linux Build Service Account
a3db3b5919 Merge "Adding priority flag for NI and AGPS callbacks" 2017-06-24 16:43:22 -07:00
Kevin Tang
a2cafde5bd Fixed loc_get_target() and removed 1530 support
it is a stale feature, been disconnected for years.

Also tightend up loc_get_target(), as it currently
doesn't get produce a result, but also return -1,
which would cause the next call and every call going
through the entire function every time it is called.

Change-Id: I348d99f690eb8973730112d5edeb870b2be2c6c8
CRs-Fixed: 2062169
2017-06-20 15:21:45 -07:00
Linux Build Service Account
3ee8c353cf Merge "Fixed crash when timerfd_create failed" 2017-06-20 01:35:08 -07:00
Saurabh Srivastava
15830de3b6 Adding priority flag for NI and AGPS callbacks
Adding priority flags while registering NI
handling callback and AGPS handling callback.
To ensure that both NI and AGPS are always
handled by our stack instead of Android
Framework stack.

CRs-Fixed: 2059476
Change-Id: I585328491a7f5d9099287924a03d7710f4e5fda9
2017-06-19 17:54:28 +05:30
Mike Cailean
38af28c322 Fixed crash when timerfd_create failed
Implemented graceful fallback when
timerfd_create is failing for
CLOCK_BOOTTIME_ALARM

Change-Id: I6561be840f37a985104a2766fc4b521d237da3b2
CRs-fixed: 2051787
2017-06-13 14:06:36 -07:00
Linux Build Service Account
8bf78f55ae Merge "Decouple position inject request from assist data" 2017-06-08 11:31:26 -07:00
Linux Build Service Account
25008877c3 Merge "Provide correct SV used_in_fix flag for QZSS" 2017-05-28 00:59:59 -07:00
Harikrishnan Hariharan
0d01cc0b5b Add support for generating NMEA sentences for BDS.
Change-Id: I77ccaac3da4d79ed6d43d1a4e59e4d438ba3d2f3
CRs-Fixed: 2047785
2017-05-28 00:51:38 +05:30
Harikrishnan Hariharan
0029fafd92 Add support for generating NMEA sentences for QZSS.
Change-Id: Ib1350fceeabcb2dc67812641b1f967b1b240cefd
CRs-Fixed: 2036931
2017-05-28 00:44:40 +05:30
Harikrishnan Hariharan
5969d0b2da Provide correct SV used_in_fix flag for QZSS
Mark QZSS SV used_in_fix based on the most recent position report

Change-Id: I166087fb62de45e1013ab29c01df3abfba7af12b
CRs-Fixed: 2043300
2017-05-27 23:41:18 +05:30
Dante Russo
566238aab1 Remove libandroid_runtime for treble compliance
CRs-fixed: 2048138
Change-Id: Idc9a3f045c6c44dea6c527ec8c6bf23e9d0a9518
2017-05-25 05:10:38 -07:00
Yingjie Wang
d9f26fc543 Decouple position inject request from assist data
Add LOC_API_ADAPTER_BIT_POSITION_INJECTION_REQUEST mask bit to
decouple from LOC_API_ADAPTER_BIT_ASSISTANCE_DATA_REQUEST.

Change-Id: I4c2f8439dca9ea3b4d56a3cd00da88e4488717bf
CRs-fixed: 2044870
2017-05-17 19:51:48 -07:00
Naresh Munagala
d09bd9face add pos tech mask and sv source info
Change-Id: I069a4564da7b96e29e5305b126cd88db0c426bc4
CRs-Fixed: 2028470
2017-05-05 04:17:59 -07:00
Linux Build Service Account
90072944fe Merge "Add vertical uncertainity field" 2017-05-03 03:46:58 -07:00
Linux Build Service Account
7a7838b718 Merge "Enable LOGV for gps directory" 2017-05-02 14:54:09 -07:00
Yingjie Wang
86ad4f8f44 Enable LOGV for gps directory
Define LOG_NDEBUG 0 to enable VERBOSE log messages in
hardware/qcom/gps

Change-Id: I954cad757f13d6bac99b7a06625daa0ace84a17e
CRs-fixed: 2025673
2017-04-28 18:24:07 +08:00
Bhavna Sharma
9c212abde1 Add vertical uncertainity field
Add vertical uncertainity field to
LocGpsLocation and report whenever
possible.

CRs-Fixed: 2028902

Change-Id: I2610b0eaf527b516e7a1cac958b82795f535cc06
2017-04-27 22:25:31 -07:00
Katz Yamada
3eef3d7a6c SystemStatus - Add ephemeris detail info in Gnss Debug interface
Add ephemeris detail info in Gnss Debug interface. This new info
also comes up in NMEA stings. Requires a new QMI_LOC interface
that supports extended NMEA string TLV.

Change-Id: I5dc566fb210c06a443ed6c27e064377851ce83a5
CRs-Fixed: 2024594
2017-04-27 13:46:09 -07:00
Dante Russo
891005e20c Move gnss hal to vendor partition
gnss hal is moved to vendor partition
for binerization enablement

CRs-fixed: 2020778

Change-Id: I8de91d0418ef4b9a1c778c45fe02d27d42c46c97
2017-04-17 15:14:57 -07:00
Linux Build Service Account
f3a58cea24 Merge "Do not send debug NMEA to ulp" 2017-04-10 17:13:52 -07:00
Linux Build Service Account
c65609bf1c Merge "Fix svCount in --GSV nmea sentence" 2017-04-05 14:48:41 -07:00
Kevin Tang
8b98a565a5 Do not send debug NMEA to ulp
Checking in GnssAdapter::reportNmeaEvent to see if the
incoming nmea is debug, in which case we do not route
that to ULP. Debug NMEA is only for SystemStatus
consumption.

Change-Id: Ifb60b9a643ad6aeb732fcaf5a68f868cb55cd88a
CRs-Fixed: 2027134
2017-03-31 19:39:01 -07:00
Linux Build Service Account
905d69ef10 Merge "added new ulp type for raw gnss data" 2017-03-31 11:21:26 -07:00
Naresh Munagala
edac52fa39 added new ulp type for raw gnss data
raw gnss daa type is added to address the
gnss raw fixes to remote clients

Change-Id: I5ebc4a8f10bd52de4e59e29dcf28d6375df02d73
CRs-Fixed: 2007050
2017-03-31 14:24:46 +08:00
Baili Feng
72e7c5da26 Fix svCount in --GSV nmea sentence
Calculate sv count for each kind of constellation.

Change-Id: If0ffa7f07245ea8b1a5bcc9933f6244f0598c575
CRs-Fixed: 2015049
2017-03-31 12:52:39 +08:00
Linux Build Service Account
2b8d001437 Merge "HLOS implementation for E911 LPPe BT/UBP feature" 2017-03-30 17:35:24 -07:00
Harikrishnan Hariharan
e581b62977 HLOS implementation for E911 LPPe BT/UBP feature
HLOS implementation for feature - E911 LPPe BT/UBP for
SUPL and LPP CP.

Change-Id: I6ec7a3ff8aaf91383832753af2d0e406938c3884
CRs-Fixed: 1088449
2017-03-30 14:46:54 +08:00
Baili Feng
ce66a81a3d Fix nmea sentence generation method of --GSV
Generate --GSV sentences from SVs in view
instead of generate them from SVs used in fix

Change-Id: I1de113e86b987b6ea01b50d800e5e13e7277baff
CRs-Fixed: 2015049
2017-03-30 13:30:16 +08:00
Naresh Munagala
06e6d68aee move nmea generation logic inside utils
NMEA generation logic needs to be reused across the
interface boundaries. Moved this logic inside utils.

Change-Id: Icb5c6fbc38b178c5edea468d26286e21749bfbfb
CRs-Fixed: 1098734
2017-03-29 18:22:08 +08:00
Kevin Tang
bbbca84aa6 LOC logging macro changes
The current logging macro always uses LOGE, which is
confusing to external developer looking at our logs.
Also changed LOC_LOGx definition to follow the same
syntax as that of LOC_LOGX.

Bug: 29499503

Change-Id: I803233a9d0b241bf9aeb2ee0d4bd2e7cc52ed75b
CRs-Fixed: 1113702
2017-03-25 14:46:30 +08:00
Linux Build Service Account
c7cf50cd43 Merge "force undefined symbols to treat as errors" 2017-03-24 13:29:59 -07:00
Linux Build Service Account
a7423ca85d Merge "possible NULL pointer dereference" 2017-03-21 19:20:47 -07:00
Linux Build Service Account
717e33675c Merge "Updating ro.baseband target property value" 2017-03-20 19:04:31 -07:00
Linux Build Service Account
ffc98a5ad5 Merge "Update the device node to check for MDM systems" 2017-03-20 19:04:30 -07:00
Linux Build Service Account
36840b0a66 Merge "getprogname is not defined in glibc" 2017-03-20 13:20:52 -07:00
Saurabh Srivastava
b37098920f Moving conf files to /vendor/etc
Moving all vendor specific conf files to /vendor/etc instead of
current /etc folder

CRs-Fixed: 1099981
Change-Id: I4495d8527941959be0847c4722ea8b68ee6c87ee
2017-03-17 16:12:54 -07:00
Naresh Munagala
9e44ec3ce2 force undefined symbols to treat as errors
added necessary flags in Makefiles to
treat undefined symbols to get caught at
compile time.

Change-Id: I77068b0d61ad432aa227c01b6229d82651ab8862
2017-03-16 10:27:01 +08:00
Kevin Tang
5253a74c6b possible NULL pointer dereference
it appears some of the MsgTask msgs might fail
to create, ending up with a NULL pointer, in
which case when it gets received, dereferencing
a NULL pointer will happen, causing crash.

Change-Id: I5a4295b4fba9c8383754e2abe6558782b1b83143
CRs-Fixed: 1106034
2017-03-15 19:23:41 -07:00
Saurabh Srivastava
54aa95888b Updating ro.baseband target property value
Updating target derivation logic based on ro.baseband property.
There are new values which must be considered in the target
derivation logic.

Change-Id: I2e81ab00c107247dcb8f1a919136bb61b482e73c
CRs-Fixed: 1105916
2017-03-15 19:20:54 -07:00
Harikrishnan Hariharan
da20b15129 Update the device node to check for MDM systems
To identify the target as MDM, we need to check for "/target"
node mdm targets instead of "/dev/mdm".

Change-Id: Ibb53acfd06a0a586f2cdca784f475d0a45718581
CRs-Fixed: 1101185
2017-03-15 19:10:32 -07:00
Kevin Tang
3fb8076a5e fixing a race condition on MsgTask::destroy()
when MsgTask::destroy() happens, msg_q_unblock() triggers
the running thread to come out from blocking state. A race
condition may happen such that that thread may complete
first, causing msgTask obj to be already deleted. A next
allocation may change the value at MsgTask::mThread. Then
when control comes back to destroy(), it may try to check
mThread and call delete on it to crash the program.

mThread is a heap obj, so it is possible to delete it after
the hosting msgTask obj is deleted.  We just have to keep
its value on the stack before calling msg_q_unblock().

Change-Id: If15884815eea05fbfa523ec92aa300ed21ef897c
CR-Fixed: 1091530
2017-03-15 18:33:17 -07:00
Kevin Tang
4d84d3669c getprogname is not defined in glibc
need to remove get_process_name as it is removed
from libcutil. Call getprogname is available in
libc but not LE glibc. Implementing a simple call
wrapper.

Change-Id: I68244b9f7fcbc290222b074f80da03330315ea29
CRs-Fixed: 1080605
2017-03-15 18:10:42 -07:00
Dante Russo
52b413eb44 hidl gnss hal 1.0 implementation
Overwrites the default hidl gnss hal implementation
to interface directly to LocationAPI

CRs-fixed: 1112712

Change-Id: I3385911956c0c6c457202a8584b108046c587b36
2017-02-28 16:47:59 -08:00
Dante Russo
c85c8ff673 LocationAPI implementation
Implementation of LocationAPI into gps hal
to be a common API that is called into by platform
specific APIs.

Change-Id: Ie5a7bd217d4ae2175ad49e6aca2fb6ecd4702f3b
CRs-fixed: 1112712
2017-02-28 16:47:50 -08:00
Baili Feng
4bb940c067 Decouple libhardware usage on LE for gnss models
Remove all usage of gps.h and fused_location.h
from all gnss models except gps/fpl hal librarys

Change-Id: I90ba233c6bbe5c31a4cacceeb981833719c871f2
CRs-Fixed: 1067953
2017-02-14 16:51:32 -08:00
Naresh Munagala
dad844f3e0 Platform specific changes for QDR
Added platform specific abstraction apis
for timer modules

Change-Id: I71d5cb847fc6a66227137b2b424f7e631e09cae8
2016-10-12 22:37:13 -07:00
Linux Build Service Account
ee55d0b1ef Merge "Upgrade LE.UM.0.0 to use location.lnx.2.0-rel" 2016-08-15 21:56:39 -07:00
Bhavna Sharma
cd13c6577d Upgrade LE.UM.0.0 to use location.lnx.2.0-rel
Fix LE compilation issues on location.lnx.2.0-rel
branch.
CRs-Fixed: 1048907

Change-Id: I5a847c82170fba3847c0132d196cd27a3757b662
2016-08-01 16:11:33 -07:00
Saurabh Srivastava
c01fcd784c Adding new target APQ-NoWGR handling
Adding handling for new ro.baseband value provided by target team
If the target does not have WGR (GPS Receiver), we return NULL
GPS and FLP interfaces.

CRs-Fixed: 1033674
Change-Id: I1561518c4f4b0c52ab934feb2fa43e9078c91d86
2016-07-29 11:45:28 +05:30
Bhavna Sharma
8e217e229d Merge remote-tracking branch 'quic/location.lnx.1.0-dev.1.0'
into location.lnx.2.0-dev

CRs-Fixed: 1038354

Change-Id: I87b3a7f33a0bb48783554bf5ecb0140695e40c9d
2016-07-08 12:04:07 -07:00
Madhanraj Chelladurai
4c2156ec8a Merge branch 'quic/LA.AF.1.2.1' into location.lnx.1.0-dev
merge automotive specific changes from LA.AF.1.2.1 into
location development branch

Change-Id: I90a5e60c46bb5b1aafaf4cd9aaf2dcb79449f288
CRs-Fixed: 1017254
2016-06-02 15:33:03 +05:30
Saurabh Srivastava
059605367a Enabling CLANG compilation
Removing LOCAL_CLANG := false from makefiles.
Couple of instances got added back as part of
LE merge.

Change-Id: I7d18d573c1d12597914124e35cb024df3343f0db
CRs-Fixed: 1021759
2016-05-30 23:09:50 +05:30
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
Linux Build Service Account
88e1de76b0 Merge "gps: include support to check hardware type property" 2016-04-12 16:22:39 -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
4b345c82ac 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-05 10:39:55 +05:30
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
Madhanraj Chelladurai
14f0dc1b52 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-18 10:56:42 +05:30
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
02cad4d981 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-23 01:47:33 -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
Ashish Dhiman
fff5a01dfe fix for compiler warnings
Change-Id: I838bfa2c66e77381be483c65b2b3bd68008a25b1
CRs-Fixed: 974489
2016-02-10 16:15:03 +05:30
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
Kevin Tang
67d576b55a 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-11-12 13:08:00 +05:30
Kevin Tang
2f74f91ac1 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-11-12 13:06:32 +05:30
Kevin Tang
f533181bd6 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-11-12 13:02:18 +05:30
Kevin Tang
91488d6fc5 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-11-12 13:00:03 +05:30
Bhavna Sharma
62a30d2faa 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-11-12 12:59:22 +05:30
Kevin Tang
153ba77107 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-11-12 12:57:56 +05:30
Kevin Tang
c9db5166b5 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-11-12 12:57:22 +05:30
Kevin Tang
58c3d32868 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-11-12 12:56:25 +05:30
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
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
Qaing Chen
339a4fc58f Fix Memory leak in util/loc_cfg.cpp
deallocate conf_copy after usage.

Change-Id: I8ad4e4e8007a2d8b608f3f74503515f062b86c4b
CRs-fixed: 852809
2015-06-13 20:01:02 -07:00
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
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
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
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