In order to maintain backwards compatibility with SystemApi versions of
LocationRequest, we chose to keep the default quality level as low.
However, this is causing problems when LocationRequests are created
through the use of legacy public APIs, leading to location requests that
do not receive locations as expected. Default the quality level to
balanced to address this issue.
Also removes old UnsupportedAppUsage annotations (past the 2 release
support limit now), and updates some variable names accordingly.
Bug: 215186921
Test: presubmits
Change-Id: I6e1fdb0b94438fd3dede75103cd70443e863a3f2
This reverts commit 331be9a643.
Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).
Original commit message:
Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()
This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).
A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.
Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
AgcLevelDb has been a subfield of GnssMeasurement. However,
GnssMeasurement is only reported by the chipset when there
is GNSS signal. For example, in deep indoor, or when there
is strong jamming signal, no GnssMeasurement can be reported,
and thus no AGC value can be reported.
To resolve that, we are adding this GnssAgc to GnssMeasurementsEvent
directly, so that the client can get AGC values even without GNSS
signal (i.e., without GnssMeasurement).
Bug: 206670536
Test: atest GnssAutomaticGainControlTest
atest GnssMeasurementsEventTest
Change-Id: I97c7ec98b6e8cc977c6e879b52a8cf75c355ae33
Exceptions thrown on one-way binder threads are dropped and ignored,
which is very harmful to writing stable code. Rethrow any exceptions
from these binder calls on the main thread to crash the process.
Test: presubmits
Change-Id: Ie5986061c6d664f59b83679c90dd07adad1a7ec2
Bug: 152453213
Tag: #refactor
This commit prepares PropertyInvalidatedCache to function as a system
api. Specifically, the methods recompute() and bypass() which may be
overridden by clients are now public (instead of protected). This
forces an update to all existing clients, to accommodate the change in
method visibility.
Two small changes have been made as cleanup:
1. The awkwardly named debugCompareQueryResults() is now
resultEquals(), which is more or less consistent with how other
equality tests are named in Android. This name change affects two
clients.
2. PackageManager has changed to use resultEquals() instead of
maybeCheckConsistency(). This provides a simpler and more
consistent use of the APIs. maybeCheckConsistency() has been made
private.
Test: atest PropertyInvalidatedCacheTests
Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()
This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).
A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.
Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
Automotive Suspend to RAM doesn't work when GNSS requests are
actively running. This change introduces system APIs for suspending
and resuming GNSS.
Bug: 187348886
CTS-Coverage-Bug: 203703449
Test: Presubmits
Change-Id: If25c761e8618bebaf989392afc0a676f930dfd78
Geocoding is unsupported, but the old APIs encourage bad behavior and
force clients to waste a thread blocking for results. This often causes
ANRs in a variety of applications. Provider an asynchronous API so
clients can avoid ANRs.
Bug: 197585308
Test: presubmits
Change-Id: I6fdd90d467f01892ce34371c2161721bd5976ca9
Apply API best practices, fix infinite loop in setBearing(), fix up
javadocs and rewrite some tests.
Bug: 187142700
Test: atest LocationTest + presubmits
Change-Id: I75decc7b167b90b5a22e718848259d454db7a08b
Logging received locations was originally removed over fears it would be
too spammy, but it is proving too difficult to debug without at least
some logs here.
Bug: 196053011
Test: manual
Change-Id: Ie18baa26daca9ad761125ad07a734f27fabfd89e
updatability.
The detailed reason why we do this is explained in the bug.
Bug: 192377485
Test: build
Change-Id: If5a800257cd3a875de208f8142ef5b4e88a05dbe
ADAS applications on automotive device require a way to access GNSS
sensors even when the master location toggle is off, so that they can
provide automotive safety services.
Bug: 156688086
Test: atest LocationProviderManagerTest
Change-Id: I438a781b2202c488da97f7ea732f87403d1068e4