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
Test: manually injected dummy measurement corrections in
GnssLocationProvider and verified that cuttlefish implementation
properly recieved them below the HAL
Bug: 145963440
Change-Id: Id659b0fdddd7852012da1bab07d0f26a3abb29af
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
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
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
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
Providing defaults allows lambdas to be used with LocationListener.
Bug: 146355527
Test: presubmits
Change-Id: Ic7b9575c2788b7fcfef91293aa2371a32621f761
Remove upgrade message for getGpsStatus() which is called at a much
greater frequency than register/unregister.
Bug: 146003205
Test: n/a
Change-Id: I32adde8a8cffa649d373fb394b06ef294481c6cf
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
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
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
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
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
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
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