Commit Graph

652 Commits

Author SHA1 Message Date
Sasha Kuznetsov
424ad90712 Merge "Update jni with measurement_corrections 1.1" 2020-01-25 23:31:42 +00:00
Soonil Nagarkar
980ce6a741 Add DPM API to request location provider enable
DPM can currently control the master location toggle, but cannot
influence the behavior of individual providers. This adds an API for
DPM (or other privileged entities) to request a provider to turn itself
on.

Practically, this is necessary to allow DPM to control network location,
which may be gated by additional consents. This change also renames some
internal location code to make clearer the distinction between provider
enabled and provider allowed: enabled = location on && allowed

Bug: 136219903
Test: CTS tests to be added
Change-Id: I05f03c976428f0f5a8a2cf627a84dc9e2baf3e67
2020-01-23 18:06:31 -08:00
Yu-Han Yang
c622cdf66c Merge "Add inter-signal bias fields to GnssMeasurement and GnssClock" 2020-01-23 20:35:28 +00:00
TreeHugger Robot
2b13f4e55f Merge "Add IRNSS svid range" 2020-01-23 18:41:40 +00:00
Sasha Kuznetsov
1ebf6158cf Update jni with measurement_corrections 1.1
Test: manually injected dummy measurement corrections in
GnssLocationProvider and verified that cuttlefish implementation
properly recieved them below the HAL
Bug: 145963440
Change-Id: Id659b0fdddd7852012da1bab07d0f26a3abb29af
2020-01-22 21:27:40 -08:00
TreeHugger Robot
34a0bef15b Merge "Fix parceling bug in ProviderRequest" 2020-01-23 01:13:14 +00:00
Yu-Han Yang
ad03c47369 Add inter-signal bias fields to GnssMeasurement and GnssClock
Bug: 147500886

Test: atest GnssMeasurementTest
      atest GnssClockTest

Change-Id: I8adaf1c1b0f6478695ca9b4768568af0ebfb11d4
2020-01-22 16:42:19 -08:00
Soonil Nagarkar
c3107caf22 Fix parceling bug in ProviderRequest
Forgot to add worksource write in addition to worksource read.

Bug: 148129736
Test: manual
Change-Id: Idac06b9191ada54bed0c79e9c799d8cd1ab0ebac
2020-01-22 14:58:16 -08:00
TreeHugger Robot
c9282b35de Merge "Support SBAS, QZSS and NAVIC navigation messages" 2020-01-22 21:31:08 +00:00
Yu-Han Yang
f81885b06a Support SBAS, QZSS and NAVIC navigation messages
Bug: 147768625

Test: atest GnssNavigationMessageTest
Change-Id: Icc788bd6762d3d8d75d7f92d3b233c05f329a104
2020-01-22 11:43:08 -08:00
TreeHugger Robot
1992ebada9 Merge "Make cN0Db and basebandCn0Db ranges consistent with HAL" 2020-01-22 18:04:30 +00:00
Soonil Nagarkar
4c0b85ba06 Overhaul FusedLocationProvider
Fix some minor bugs and ensure fused location provider correctly
supports location bypass. This is especially important for when
location bypass is invoked in direct boot.

The added UPDATE_DEVICE_STATS permission is necessary for FusedLocation
to correctly update WorkSources. FusedLocation receives work from LMS and
then further delegates that work to other location providers. The other
location providers should be informed of the correct applications for
battery blame, and should not be blaming the FusedLocation package.
1) This is the minimally scoped permission necessary to battery blame
correctly.
2) There is no way to attribute battery blame without this permission.
3) This is the correct permission - as required by LocationManager, and
this permission will likely never be removed (FusedLocation will always
need to battery blame).

Test: atest FusedLocationTests
Change-Id: If7126fffaae5577ddf8e366a0b5c17b3e5286582
2020-01-22 17:22:54 +00:00
Blake Kragten
439408699d Merge "Revert "GPS Atoms Addition"" 2020-01-16 17:18:11 +00:00
Blake Kragten
c7bdb71cc7 Revert "GPS Atoms Addition"
Revert "CTS GPS test"

Revert submission 9726785-1574459091307-c480d999

Reason for revert: Pushed atoms will be integrated into the new pulled atom.
Reverted Changes:
I9cbc8e41e: CTS GPS test
If8aed8f47: GPS Atoms Addition

Change-Id: I8d0a0b73d870a8d9fb02975df70f662de4fd1690
2020-01-15 18:57:33 -08:00
Yu-Han Yang
489465a687 Add IRNSS svid range
Bug: 147675678

Test: doc only and it builds.
Change-Id: I1c88475fd1673e173b3c62524b51ba566c08e85a
2020-01-14 10:55:01 -08:00
Soonil Nagarkar
8df02f452c Refactor providers/managers
Refactor how providers/managers are implemented in LMS, substantially
simplifying code, and opening up further simplification around
permissions in the next change.

Also, limit the number of additional packages providers can have, and
merge WorkSource into ProviderRequest so that providers can pass just
ProviderRequests around, not both.

Test: presubmits
Change-Id: Ic6fab46883cf53eb26368b54a824feac39c57a32
2020-01-09 14:52:50 -08:00
Yu-Han Yang
cb162534b6 Make cN0Db and basebandCn0Db ranges consistent with HAL
Bug: 136136192
Test: existing tests passing
Change-Id: I7ffc40f7f00e3d5e141d10025de6fe7886c61ba7
2020-01-08 12:19:34 -08:00
TreeHugger Robot
8cb0e1cfb7 Merge "Provide defaults and annotations for LocationListener" 2019-12-19 22:15:02 +00:00
Artur Satayev
53fe96661b Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I4bc8c9482e4bb1af21363f951affff7ee3fefeab
2019-12-18 15:42:06 +00:00
Soonil Nagarkar
13cde9694d Provide defaults and annotations for LocationListener
Providing defaults allows lambdas to be used with LocationListener.

Bug: 146355527
Test: presubmits
Change-Id: Ic7b9575c2788b7fcfef91293aa2371a32621f761
2019-12-16 11:47:59 -08:00
Soonil Nagarkar
45cc8691a6 Merge "Remove logspam" 2019-12-10 23:28:33 +00:00
Soonil Nagarkar
76b1d81bfe Remove logspam
Remove upgrade message for getGpsStatus() which is called at a much
greater frequency than register/unregister.

Bug: 146003205
Test: n/a
Change-Id: I32adde8a8cffa649d373fb394b06ef294481c6cf
2019-12-10 13:42:18 -08:00
Wei Wang
c3fabdcad3 Merge "Expose FUSED_PROVIDER to test API." 2019-12-10 21:03:03 +00:00
Blake Kragten
0ce12c26c4 Merge "L5 metrics are not getting reset" 2019-12-06 22:40:37 +00:00
Blake Kragten
ccb7ad664d L5 metrics are not getting reset
Bug: 145769788
Test: On Device
Change-Id: If12dba3a75176ccb4c2bc25bbbbd003b19d92fb1
2019-12-06 09:47:31 -08:00
Soonil Nagarkar
06e37f67de Update location broadcast behavior
Updates location broadcast behavior in preparation for future changes
that will remove writes to LOCATION_PROVIDERS_ALLOWED. These changes
ensure that clients can properly listen for changes to provider enabled
status without being reliant on the deprecated
LOCATION_PROVIDERS_ALLOWED.

Bug: 145752928
Test: presubmits
Change-Id: I073749a895a6a206023290d83ea815a361353460
2019-12-05 12:22:57 -08:00
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
Wei Wang
621e4cf504 Expose FUSED_PROVIDER to test API.
Test: it compiles
Bug:136079152
Change-Id: I921ae9ed75f2f4d44fda892be4a70bf23f40845c
2019-11-27 14:01:09 -08: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