Commit graph

127 commits

Author SHA1 Message Date
Linux Build Service Account
d519abf0c1 Merge "Replace wall time" 2017-12-25 08:03:44 -08:00
Kevin Tang
03bc75f298 fixing the location api level race condition on callbacks
At the layer right under HIDL impl, where the callback objs
are received from HIDL and used by HAL layer, there is race
condition volnerability which could yield using a incompletely
copied sp obj. Added mutex protection.

Change-Id: I611db590d1fadbe43c74db71a1ea906dbe067c6d
CRs-Fixed: 2144976
2017-12-21 13:29:37 -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
Yingjie Wang
9fe73f379a Check ret value for HIDL callback method
Judge ret value for niNotifyCb to check HIDL return status

Change-Id: I0cde3716a971941260f2fb12c9e5927bc8c8d548
CRs-fixed: 2147437
2017-11-21 12:20:06 +08:00
Saurabh Srivastava
0107dbe7d3 Invoking HIDL callback via local variable
Copying HIDL callback member variable to
a local variable before invoking.
This is to avoid possible race conditions
with the callback getting updated during
invocation.

Change-Id: Ida9658f4cffafc64754c0cd26541b731cb328155
CRs-Fixed: 2114085
2017-10-27 09:05:29 +08:00
Saurabh Srivastava
57640c9f33 Checking HIDL callback return value
Change-Id: I937f155b80d54396f86fb44d731bc592ae49411e
CRs-Fixed: 2120892
2017-10-16 19:55:47 +05:30
Katz Yamada
f5f0f29c13 Add storing dataitem in systemstatus report
SystemStatus stores incoming dataitem events
received from osagent into its internal
systemstatus report cache.

Change-Id: I129c633b45abfc04c9d9bbbd558db5f6e93c1672
CRs-Fixed: 2093347
2017-10-09 10:04:13 -07:00
Kevin Tang
fb4bbe52f4 fixing conn disconnect handling from GnssLocationProvider
The "type" needs to maintain as signed, in case some value
may come across as negative, even though the storage size
may vary, from 8-bit to 32-bit, for example.

Bug: 65164961

Change-Id: Ieb3fb4b6f8415444bbe192a7875093f86a9c3068
CRs-Fixed: 2106350
2017-09-20 17:47:48 -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
Vamana Murthi
1b6695633f XC 2.5 : additional changes
Add the XTRAsystemstatus observer to
pass the HAL init info to XTRA-Client

CRs-Fixed: 2093274
Change-Id: I893da1470d4fedafbc7545806ea97667acdf60d3
2017-08-15 14:36:57 -07:00
Linux Build Service Account
c41a43c59f Merge "Fix potential deadlock in measurements report" 2017-08-10 22:42:38 -07:00
Dante Russo
54d6a878fd Fix potential deadlock in measurements report
If Gnss Measurements callback is called at the same time
as Gnss Measurements close is called, this will cause
dead lock.
Remove using mutex in this case and instead use a simple
bool to know whether or not to call into a the callback.

Bug: 63909793
Change-Id: I98d2be5ebd2ee0f36e4d2e31d20a74585089fe31
CRs-fixed: 2089716
2017-08-09 11:50:42 -07:00
Baili Feng
4c9c783989 Clean up compiler warning message
CRs-Fixed: 2070597
Change-Id: Ic57f5211a4e4b9112888435d54df7a361bcb6767
2017-08-01 18:17:20 +08: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
Dante Russo
1bd0de5d87 Fix yearOfHw as 2016 pre ES SUPL concurrency
Add capability bit for Nmea Debug, which
is a marker for modem support of concurrent
emergency supl session and normal gps session.

CRs-fixed: 2068217
Change-Id: Iea1ee7b56bfdd28643928edf0475cf21257de64c
2017-07-14 11:26:42 -07:00
Linux Build Service Account
978f2b9410 Merge "Update the latest LocationOptions" 2017-07-06 22:31:32 -07:00
Baili Feng
ba171737ab Update the latest LocationOptions
Restore unintentionally removed code.
Call locAPIUpdateTrackingOptions in gnssSetPositionMode.

Change-Id: I35a84c92de6a4b3df16d779fbb79601212d61119
CRs-fixed: 2071240
2017-07-06 17:02:50 +08:00
Linux Build Service Account
7ac8c0331a Merge "Removing header copying to out folder" 2017-07-03 21:13:21 -07: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
Baili Feng
1a128bd7cd Split control apis to a separate class
Move control apis to LocationAPIControlClient.
There should be only one instance of it per process.

Change-Id: I5969e6b3ad45f3fc5bfe4f4cd543a077c540c3ea
CRs-Fixed: 2064389
2017-06-27 19:04:00 +08:00
Linux Build Service Account
a3db3b5919 Merge "Adding priority flag for NI and AGPS callbacks" 2017-06-24 16:43:22 -07:00
Linux Build Service Account
4aca11df97 Merge "Fix NI for Notify and Verify being true" 2017-06-20 01:35:10 -07:00
Linux Build Service Account
6cd01b2a90 Merge "Fix config updates for some LocatoinAPI bit masks" 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
Dante Russo
5fc6fa657c Fix NI for Notify and Verify being true
CRs-fixed: 2059175
Bug: 62049857
Change-Id: I6c4717ddbd72f15972e5d4bd8897b528fbe2c2b4
2017-06-15 15:43:27 -07:00
Dante Russo
fc5c5f6625 Fix config updates for some LocatoinAPI bit masks
Fix SUPL mode, GPS lock, and GNSS Ni options to be
treated like bit masks instead of values.
Rename some enums of bit masks with _BIT as convention.

Change-Id: I036b682ca3472159304ef569ff67d28dc94f644e
CRs-fixed: 2039308
2017-06-15 15:43:17 -07:00
Baili Feng
7b1d6ec5aa Update the latest LocationOptions to LocationAPI
Call locAPIUpdateTrackingOptions in gnssSetPositionMode.
Update tracking options should update the tracking
sessions so that the smallest interval options are
set.

Change-Id: I24cefe4fb711a160d0a72ab7592d8e673ea2dd97
CRs-fixed: 2048231
2017-06-08 18:00:13 -07:00
Linux Build Service Account
740a459dac Merge "HIDL Extension" 2017-05-27 17:09:38 -07:00
Linux Build Service Account
2a49c5a0ef Merge "Move location files from /data/ to /data/vendor/" 2017-05-27 01:36:12 -07:00
Baili Feng
d640d06213 HIDL Extension
Prevent building of android.hardware.gnss@1.0-service-qti
if non-PDK build.

CRs-fixed: 2040636
Change-Id: Ic6ee787d7fca93f649cd1f2bbd7be46cdefc809f
2017-05-25 14:08:03 -07:00
Katz Yamada
e3d70314b0 Fix for incorrect SVids and timestamps in bugreport
Fix SVids and timestamps shown in adb bugreport to
align with Android standard.

Change-Id: Ib166b09f1d63f7a93d53798dbb188fec0d77e88a
CRs-Fixed: 2042937
2017-05-18 11:00:17 -07:00
Dante Russo
ed7e095d16 Move location files from /data/ to /data/vendor/
Runtime files and sockets used by location modules
are moved to vendor partiion from /data/misc/location
to /data/vendor/location.

Change-Id: I7b092059b3061def2a1f2d0cd9bffb7ed7aededd
CRs-fixed: 2046657
2017-05-18 10:32:12 -07:00
Linux Build Service Account
9546df2965 Merge "GnssBatching::init handle multiple invoking" 2017-05-17 04:02:00 -07:00
Linux Build Service Account
8548469c58 Merge "Allow SUPL_MODE of Standalone only" 2017-05-16 04:22:33 -07:00
Linux Build Service Account
82687ac882 Merge "Check the return value of HIDL Callbacks" 2017-05-16 04:22:33 -07:00
Linux Build Service Account
3768a6f946 Merge "Stop Gnss measurements session when closed" 2017-05-16 04:22:32 -07:00
Dante Russo
c804609595 Allow SUPL_MODE of Standalone only
SUPL_MODE being set to standlaone only is
valid and needs to be accepted by HAL.

Bug: 37947277
Change-Id: Ib9d0073c304305f0fafaea1940ce292450eaa9f7
CRs-fixed: 2044643
2017-05-12 16:11:49 -07:00
Dante Russo
4c265534bb Check the return value of HIDL Callbacks
GNSS HAL needs to check the return value of HIDL
Callbacks to avoid crashing when things go wrong.

Bug: 37987256
Change-Id: I4a5e33f7f4d85c887bc91fa71336a78151c3ce3b
CRs-fixed: 2044206
2017-05-12 16:11:00 -07:00
Dante Russo
f354bdfa62 Stop Gnss measurements session when closed
Gnss measurements session that is started to
collect Gnss measurements needs to be stoped
when closed.
Also remove the ability for an MSA tracking
session to be started when Gnss measurments is
started because MSA tracking is power hungry
and it wouldn't provide measurements either

Change-Id: I9b20f73bd412fc68d96dad2dc38399c144922ea0
CRs-fixed: 2039306
2017-05-12 16:04:43 -07:00
Baili Feng
997b6b55ab GnssBatching::init handle multiple invoking
Release mApi if mApi is not null and return true.

Change-Id: I996bd94fca83f93fa47a9dcf282ebf4610071288
CRs-fixed: 2043876
2017-05-08 16:09:06 +08:00
Linux Build Service Account
10ab9ccaaf Merge "remove inet group" 2017-05-04 03:38:02 -07:00
Linux Build Service Account
7a7838b718 Merge "Enable LOGV for gps directory" 2017-05-02 14:54:09 -07:00
Ruifeng Xu
477ff7eae5 remove inet group
inet group shouldn't be with gps hal daemon.
this change removed it.

Change-Id: Ibc8faa20d7778c30ae0c640fdcceee28bae123e2
CRs-fixed: 2040891
2017-05-01 10:32:13 -07:00
Linux Build Service Account
f4f9b5c5a6 Merge "Prevent print of uninitialized string" 2017-04-29 14:48:03 -07:00
Linux Build Service Account
9ffa1ace5d Merge "Add handling of GNSS NI TYPE EMERGENCY" 2017-04-29 14:48:02 -07:00
Linux Build Service Account
e5f59f0fb2 Merge "SystemStatus - Add ephemeris detail info in Gnss Debug interface" 2017-04-28 21:34:55 -07:00
Linux Build Service Account
9f59a9e76a Merge "Add group radio to gnss hal process" 2017-04-28 21:34:38 -07:00
Kevin Tang
222094ce77 Prevent print of uninitialized string
If uninitialized string gets printed, this can
cause a crash.

Bug: 37218688
CRs-fixed: 2032144
Change-Id: I7c34b6f84f414410c52fc59f73053892060b0874
2017-04-28 16:31:46 -07:00
Kevin Tang
08efa3c6c2 Add handling of GNSS NI TYPE EMERGENCY
Network Initiated type emergency was not being
handled because it was missing from gnss hal api.
Hardcoded value until it is added in gnss hal api.

Change-Id: If0e538c3083e351bf642765eae88404ce6e0ae1b
CRs-fixed: 2037093
2017-04-28 16:21:53 -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
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
Linux Build Service Account
6cf01fac92 Merge "connectity events for XC2.0 daemonize" 2017-04-27 07:13:38 -07:00
Linux Build Service Account
9d80214901 Merge "Send ENGINE_OFF when stop tracking" 2017-04-26 23:16:01 -07:00
Dante Russo
19f6501f03 Add group radio to gnss hal process
Needed for dsi connection for supl es
Bug: 37409476
CRs-fixed: 2037256
Change-Id: Ieb84ab29349021e2ea07d6baf07a6c8a37c183cf
2017-04-26 11:27:55 -07:00
Ruifeng Xu
488aa4f196 connectity events for XC2.0 daemonize
send connectity events to XTRA client
via local socket.

Change-Id: Icb9f04eca61a0f41d9628d95e458bc7f7be56c50
CRs-fixed: 2023484
2017-04-26 11:04:56 -07:00
Dante Russo
9a957ef66e Move gnss hal to default instance
gnss hal must use the default instance
instead of gnss instance for binderization

CRs-fixed: 2020778
Change-Id: I96c203751891728542f06bede3d1ee8282c7878b
2017-04-17 15:17:24 -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
Dante Russo
9e232dda61 Remove owner of gps hal modules
Owner does not need to be specified for
this project.

Change-Id: I918a767ed3b83e134c5e63ded5b25070b3399ac8
2017-04-17 15:12:16 -07:00
Dante Russo
d48c19e8f0 Fix GnssDebug with new AOSP changes
New AOSP changes have modified GnssDebug
HIDL API, so changes are needed to fix
compilation

Change-Id: Ia1543a8475ac9366131e58b138577f37e91f0592
2017-04-06 08:21:31 -07:00
Baili Feng
909d752d60 Send ENGINE_OFF when stop tracking
fix typo in function onStopTrackingCb,
send ENGINE_OFF instead of ENGINE_ON

Change-Id: I0e4a73f25283cf172caeaa74e3bc385020b660ff
CRs-fixed: 2025876
2017-04-06 15:56:54 +08:00
Linux Build Service Account
64cc3ec9e7 Merge "Convert GnssConfig parameters to enum" 2017-03-30 22:12:20 -07:00
Baili Feng
59fce4feb5 Convert GnssConfig parameters to enum
Convert parameters to enum values instead of static_cast

CRs-Fixed: 2025873
Change-Id: Ief9cf31bee9b9772350d5191cdd45853f0f42131
2017-03-30 09:57:35 +08:00
Baili Feng
4fc5a782cf correct the conversion of ConstellationType
map GNSS_SV_TYPE_GPS to GnssConstellationType::GPS

Bug: 36644020
CRs-fixed: 2025520
Change-Id: I28fe4b5aff17495f50b0ae7fb0465bbd82a66627
2017-03-28 13:59:28 +08:00
Linux Build Service Account
e72716080e Merge "Added support for AGC" 2017-03-25 15:20:33 -07:00
Mike Cailean
3ad14ba827 Added support for AGC
Added support for AGC (automatic gain control)

CRs-fixed: 2023324

Change-Id: I6d6da23aab66da14bfa594077beda15194bdbeba
2017-03-24 15:46:39 -07:00
Linux Build Service Account
8f6ba9dbc3 Merge "Check Null on call to LocationAPI::addGeofence" 2017-03-24 06:31:25 -07:00
Linux Build Service Account
f9c8471eff Merge "Addition of vertical/speed/bearing accuracy feilds" 2017-03-24 06:31:24 -07:00
Linux Build Service Account
50952f03af Merge "SystemStatus - Add BugReport support" 2017-03-24 06:31:22 -07:00
Dante Russo
2e87b20579 Check Null on call to LocationAPI::addGeofence
We need to handle the case where addGeofence returns
Null, which can happen on error conditions, like when
dlopen/dlsym libgeofence.so fails

Bug: 36407968
CRs-fixed: 2022286
Change-Id: Ib612d92b77cf5532ad19154c57ee0545674d88f9
2017-03-23 12:28:52 -07:00
Dante Russo
af318504e2 Addition of vertical/speed/bearing accuracy feilds
Fill in the new feilds of vertical/speed/bearing accuracy
into hidl structure

CRs-fixed: 2021399
Change-Id: I409e2559e671e65c307758ee273c64f98f650c11
2017-03-22 17:39:50 -07:00
Katz Yamada
4ff6da4a8a SystemStatus - Add BugReport support
Add BugReport support in SystemStatus. It exposes getReport
interface to GnssDebug via GnssAdapter. GnssDebug generates
Gnss' BugReport information upon a request tiggered by Android
framework.

Change-Id: I681777da10c860ea15ee65b7860a5ce61a7798db
CRs-Fixed: 2016125
2017-03-21 21:42:32 -07:00
Dante Russo
b6928aae36 Send capabilities callback for each init
Added sending the capabilities to hal clients
on every init, instead of only on the first init.
This is needed for the cases when the hal client
crashes and is trying to reinit.

Bug: 36182606
Change-Id: I9055d2319f1dc407b6de9627b4e66eb89f8ce9d1
CRs-fixed: 2019987
2017-03-17 14:52:01 -07:00
Linux Build Service Account
279d118562 Merge "Rename FlpAPIClient and GnssMeasurementAPIClient" 2017-03-07 19:18:51 -08:00
Baili Feng
545f52f6b5 Rename FlpAPIClient and GnssMeasurementAPIClient
FlpAPIClient renamed to BatchingAPIClient
GnssMeasurementAPIClient renamed to MeasurementAPIClient

Change-Id: Ic0fae37fd1d798796cb918ddcf141913c6cc3c6e
CRs-fixed: 1112712
2017-03-07 09:32:33 +08:00
Saurabh Srivastava
5fecc1979b Adding ATL call flow to new Loc API interface
Re-designed the ATL call flow, to fit along with
updated Location API.

Change-Id: If22e672d1c233c55b6b52107be7169b3036d9a3e
CRs-fixed: 1112712
2017-02-28 16:59:38 -08: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