Commit Graph

625 Commits

Author SHA1 Message Date
TreeHugger Robot
2e955bcb7d Merge "Add basebandCn0Dbhz to GnssMeasurement" 2019-12-04 00:54:05 +00:00
TreeHugger Robot
deaecab703 Merge "Add basebandCn0DbHz to GnssStatus" 2019-11-28 01:06:25 +00:00
Yu-Han Yang
9fe06ddab8 Add basebandCn0Dbhz to GnssMeasurement
The new basebandCn0DbHz is the carrier-to-noise density measured at the
baseband. The old Cn0DbHz is measured at the attenna port. Adding
the new field so that ecosystem will report both and avoid reporting
inconsistent signal strengths in one field. See go/r-gnss-hal for
detailed design.

Bug: 136136192
Test: atest GnssMeasurementTest
Change-Id: Ia8d3711e7422db5cae05d66138a3fae61bec0ae1
2019-11-26 14:29:07 -08:00
Yu-Han Yang
15e4303a5b Add basebandCn0DbHz to GnssStatus
The new basebandCn0DbHz is the carrier-to-noise density measured at the
baseband. The old Cn0DbHz is measured at the attenna port. Adding
the new field so that ecosystem will report both and avoid reporting
inconsistent signal strengths in one field. See go/r-gnss-hal for
detailed design.

Bug: 136136192

Test: atest GnssStatusTest
Change-Id: Idbfb611c6cb1c8d00c1f3bb719e422177a5ff7f2
2019-11-26 16:37:16 +00:00
David Castro
534c700111 Merge "Expands on the definition of the timestamp parameter, as per clju@ in BUG:119380943." into qt-dev am: 716edf3883 am: a9a4771159 am: b563d173d2
am: 0f97261406

Change-Id: Ib7a49f5a6aa1581a30fc64d7be0d743d5b560733
2019-11-25 07:21:20 -08:00
David Castro
5df37b4e9b Merge "Updates the description of the provider parameter as per feedback in BUG:111695926." into qt-dev am: e3681d08e9 am: 0c8d339950 am: b69d94a847
am: d52dd84fbf

Change-Id: Ia9ce650cb5d061d636ed0b6f21ed101fd0a5c9f5
2019-11-24 04:58:51 -08:00
David Castro
0f97261406 Merge "Expands on the definition of the timestamp parameter, as per clju@ in BUG:119380943." into qt-dev am: 716edf3883 am: a9a4771159
am: b563d173d2

Change-Id: Iac5a860e2ad80ebb4854751de0820b33df7dc113
2019-11-22 08:39:56 -08:00
David Castro
b563d173d2 Merge "Expands on the definition of the timestamp parameter, as per clju@ in BUG:119380943." into qt-dev am: 716edf3883
am: a9a4771159

Change-Id: I5a4721a39690604cacbe4fb577a5c5e14e4fd104
2019-11-22 08:33:01 -08:00
David Castro
716edf3883 Merge "Expands on the definition of the timestamp parameter, as per clju@ in BUG:119380943." into qt-dev 2019-11-22 15:57:29 +00:00
David Castro
d52dd84fbf Merge "Updates the description of the provider parameter as per feedback in BUG:111695926." into qt-dev am: e3681d08e9 am: 0c8d339950
am: b69d94a847

Change-Id: I5b22d3a71f4b12d0695f45f4ced45f633c271030
2019-11-21 20:04:05 -08:00
David Castro
b69d94a847 Merge "Updates the description of the provider parameter as per feedback in BUG:111695926." into qt-dev am: e3681d08e9
am: 0c8d339950

Change-Id: Iee45bfe51ead8d45eeccf7c0e362910f1ea59757
2019-11-21 19:53:56 -08:00
David Castro
46676918a1 Updates the description of the provider parameter as per feedback in
BUG:111695926.

Change-Id: I74fa22d7733d06616be44da3923649271584090c
2019-11-21 16:53:21 +00:00
David Castro
759ede67c8 Expands on the definition of the timestamp parameter, as per clju@ in
BUG:119380943.

Change-Id: Ib0f440a1f07eb1dad7690723a1b133955ad290b4
2019-11-20 22:56:45 +00:00
Blake Kragten
212edc735b GPS Atoms Addition
Porting gps location status (success/failure) logging to atom
GpsLocationStatusReported will be used by 2 count metrics to
determine the location failure rate.

Porting gps time to first fix seconds logging to atom
GPsTimeToFirstFixReported will be used by a value metric to determine
the average time to first fix on a GPS signal.

CTS tests will be added for these atoms in subsequent CL

Test: On Device using test script and gnsslogger.apk
>  make statsd_testdrive
>  ./out/host/linux-x86/bin/statsd_testdrive <ATOM_ID>

Bug: 141631388
Bug: 142740230
Change-Id: If8aed8f475078b05b977a73b4bba91c85af7716a
2019-11-19 10:56:59 -08:00
Artur Satayev
751e55114c Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
2019-11-19 15:05:35 +00:00
Soonil Nagarkar
fc28b55926 Merge "Make GnssStatus and GpsStatus testable" 2019-11-14 22:04:37 +00:00
Soonil Nagarkar
0d1890b0e0 Make GnssStatus and GpsStatus testable
Allow clients to create GnssStatus and GpsStatus objects for test.

Bug: 144027538
Test: na
Change-Id: Ice3eb966a88e6de5bc8834b60b54bcac31bf31db
2019-11-14 10:26:41 -08:00
Soonil Nagarkar
d73a4f0118 Fix LM deadlock possibility
Put onRemoved callbacks on the same thread as all other callbacks so
that they cannot be reordered and introduce deadlock or other bugs.

Test: n/a
Bug: 144487580
Change-Id: I60ad76c40348138bf54d39e966c133fa5db89861
2019-11-14 09:46:44 -08:00
TreeHugger Robot
4704618dd3 Merge "Update provider javadocs" 2019-11-12 23:03:56 +00:00
Soonil Nagarkar
e24559e137 Update provider javadocs
As per API council feedback

Bug: 143550828
Test: n/a
Change-Id: I05b3e81723512c1833120682e509b67e10fb4de9
2019-11-12 12:27:45 -08:00
Soonil Nagarkar
4af3b8d14e Re-add incorrectly removed API
addNmeaListener was incorrectly removed in Q, breaking backwards
compatibility. Re-adding in R so that apps can continue to compile
against R while working on older platforms.

Bug: 141019880
Test: na
Change-Id: I527e73dcdb30fa4af8ca91bcfe113b2aa7bc87a5
2019-11-12 12:09:52 -08:00
Soonil Nagarkar
599511db79 Merge "Add comment about support lib to GnssStatus" 2019-11-12 17:31:59 +00:00
Soonil Nagarkar
0ad004ae8d Add comment about support lib to GnssStatus
Test: n/a
Change-Id: I03976f47d08ac215523db8c946aa302624fbaf07
2019-11-11 16:29:11 -08:00
Soonil Nagarkar
394b86831b Reduce GpsStatus API crashes to SDK S+
Bug: 144125622
Test: n/a
Change-Id: Ic1f6e1ed8daf867fbfdc1ce94d42420577e29bac
2019-11-11 13:36:29 -08:00
Artur Satayev
7a565c45b1 Merge "Add @UnsupportedAppUsage annotations for greylist."
am: 423c3a32d6

Change-Id: I5387b4742fdaf67ad3189356f2361f73969b53a8
2019-11-11 09:13:24 -08:00
Artur Satayev
fc46be7dbd Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00
Soonil Nagarkar
4d77e6a59b Fix no-handler callback registrations
Test: n/a
Change-Id: I9d4027427fa6f737eda050347cad3b3dade10e3c
2019-11-06 20:08:56 -08:00
Soonil Nagarkar
95768ce277 Fix determining request expiration time
Add a helper method to LocationRequest for determining the expiration
time and utilise from both LMS and GeofenceManager.

Bug: 143963313
Test: atest LocationManagerTest
Change-Id: Iac2af3f7f41d68342ef067cfef3b7169476266eb
2019-11-05 15:54:27 -08:00
TreeHugger Robot
9a6c8eeab1 Merge "Add missing Deprecated annotations" 2019-10-31 23:21:28 +00:00
Soonil Nagarkar
5eb2f071f8 Add missing Deprecated annotations
Test: na
Change-Id: I7b06dc4bf93494da849b0c5fb63e027d9fc3d06f
2019-10-31 14:10:58 -07:00
Soonil Nagarkar
39d614aa83 Allow listener garbage collection
Currently listeners that expire (either because of expireAt or
numUpdates) will never be removed from the client listener list. Fix
this by adding a new ILocationListener callback.

Also remove old status callback that isn't being used anymore.

Test: atest CtsLocationFineTestCases
Change-Id: I3f8a5058988c8257f25fe63a0c62e9d26ed2cf00
2019-10-31 14:05:03 -07:00
Soonil Nagarkar
c4a4833708 Prevent crash when invoking GNSS apis
GNSS APIs may crash when invoked on devices without GNSS, fix this
implementation.

Bug: 143591625
Test: manual
Change-Id: I6de563df96bc4605852989243c38e5d5278cbda0
2019-10-30 17:04:26 -07:00
Soonil Nagarkar
5a1049564a Merge "Add expireIn implementation to LocationRequest" 2019-10-30 18:09:26 +00:00
Soonil Nagarkar
b81c30db9e Fix remaining Handler mismatch
Use direct executor for backwards compatibility when
addGpsStatusListener is invoked not on a handler.

Bug: 143544726
Test: manual
Change-Id: I594e302962737154e29d8226d0c19dbdebd18cbb
2019-10-29 12:12:08 -07:00
Soonil Nagarkar
7630c828b8 Minor fixes for CTS tests
-Ensure deprecated GNSS APIs run on binder threads for backcompat.
-Normalize exception thrown on null criteria to
IllegalArgumentException.

Bug: 143110531
Test: atest LocationManagerTest
Change-Id: I962234913857cb0c5bfdf46653986ab2a55bd5ee
2019-10-23 17:09:51 -07:00
Philip P. Moltmann
6c7377c888 Add featureId to LocationManager app-op notes
This pipes through the calling context's featureId for the
AppOpsManager#noteOp calls in the LocationManagerService.

Test: atest CtsAppOpsTestCases
Bug: 136595429
Change-Id: I754378b2c9e1740103e3441212ff11622b29a9d7
2019-10-22 09:26:05 -07:00
Soonil Nagarkar
e347ea1bd3 Add expireIn implementation to LocationRequest
Clients should no longer need to reset expireIn every time they make a
location request. Also allow clients of getCurrentLocation() to set
their own timeout if desired, and enforce a timeout for
requestSingleUpdate().

Bug: 133356925
Bug: 142956404
Test: atest LocationManagerTest
Change-Id: I1b3a4d8d6ef249a2395b0d30bf7b92a8d4cfe933
2019-10-18 17:22:31 -07:00
Soonil Nagarkar
905e7227dc Add getCurrentLocation API to LocationManager
Add new API to replace requestSingleUpdate() which is safer and more
convenient for clients to use.

Bug: 133356925
Test: manual (CTS tests coming in separate patch)
Change-Id: Ib7f76bcbff0cd010a479bb7a02e2f7e51e65525c
2019-10-17 16:17:34 -07:00
Soonil Nagarkar
4eaa2ecb7f Fix typo
Test: n/a
Change-Id: I1023daa59fbee38af8d7b8f9636fff6136894582
2019-10-16 17:50:04 -07:00
Soonil Nagarkar
f5306d433a Move registerGnssMeasurementsCallback onto direct executor
Preserves behavior from previous releases for legacy clients.

Bug: 141887245
Test: CTS
Change-Id: I75bb38b2ed65cca13068d7727343c6f0782ef9d8
2019-10-16 17:33:17 -07:00
TreeHugger Robot
99347aa691 Merge "Update javadocs as per API council feedback" 2019-10-16 21:31:21 +00:00
TreeHugger Robot
acb8ee8122 Merge "Normalize null argument behavior for GNSS APIs" 2019-10-16 06:08:08 +00:00
Soonil Nagarkar
88be6bf15c Update javadocs as per API council feedback
Bug: 142715945
Test: n/a
Change-Id: I0a7149c144a2f660bb135efe0d32ed625b40d90b
2019-10-15 15:15:58 -07:00
Soonil Nagarkar
f4a93276a1 Normalize null argument behavior for GNSS APIs
Previously some GNSS APIs would fail with NPE instead of
IllegalArgumentException. Also update JavaDocs to make behavior clear.

Bug: 142736900
Test: coming soon
Change-Id: If3228ff4f00629dd9eb099b8da8d8eea5d8852ad
2019-10-15 13:23:03 -07:00
Philip P. Moltmann
aad41eb667 Merge "Add useful app-op-note message to async Location deliveries" 2019-10-15 18:11:31 +00:00
Philip P. Moltmann
bc8b48a97b Add useful app-op-note message to async Location deliveries
Test: atest CtsAppOpsTestCases
Bug: 136505050
Change-Id: I1a34cd993132cc4fdf87c92625595240bb8ec4a7
2019-10-14 10:55:52 -07:00
TreeHugger Robot
b7d4e8ccf6 Merge "Add a Test API to verify if gmscore is the network location provider." 2019-10-12 04:24:39 +00:00
Soonil Nagarkar
597703c518 Merge "Expose NO_GPS_LOCATION APIs to system and test" 2019-10-11 20:32:45 +00:00
Wei Wang
9f52d55eb2 Add a Test API to verify if gmscore is the network location provider.
Bug:136079152
Test: adb shell am instrument -w -e class com.google.android.location.gts.LocationManagerTest com.google.android.location.gts/androidx.test.runner.AndroidJUnitRunner
Change-Id: Ibe8ffc6148ea22bef279f75275719075d26f346c
2019-10-11 13:18:53 -07:00
Soonil Nagarkar
79c47e27fe Expose NO_GPS_LOCATION APIs to system and test
These APIs are required for use by CTS tests and location providers.

Bug: 142481153
Test: manual
Change-Id: I09815477c2ac822a310b360145c8297170d24150
2019-10-11 11:30:45 -07:00