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
LocationManagerService was overwriting location source appops tag
information whenever a location provider changed state. Since multiple
location providers can correspond to the same uid/app id, this could
lead to loss of tags. This is fixed by recalculating the set of tag for
an entire app id any time a uid changes.
AppOpsPolicy had a bug where tag lists coming from different uids under
the same appid would inappropriately overwrite each other. This is fixed
by modifying the internal/external APIs to work in terms of appid rather
than uid, so that it is someone else's responsibility to ensure the
result is valid for the app id as a whole.
Also fixes a bug where LMS assumes tag listeners are added prior to any
providers. If listeners are added after some providers they will miss
updates. Fixed by always updating the listener on registration.
Bug: 190073375
Test: manual
Change-Id: Ib52d752d857b6ac3b6683186a8d1bbcb814fb798
Change eventlog behavior solely based on logging properties, not the
debug build. This allows for reduced logging even on debug builds. Minor
updates to LocationProviderBase.
Bug: 190609486
Test: manual
Change-Id: I1efb28663de7ddd4224b01afe195baf3ff78ddb0
When APIs are refactored mid-release, they can often be left marked
as @Deprecated with the intention of eventually removing them before
the SDK is finalized.
Well, the time has come to finalize the SDK, so let's clean them up.
Bug: 189325658
Test: manual
Change-Id: I48e3e1c1306fbaf071e4acfd9e8107e6ad564ffe
Remove getFlags/setFlags, determining the flag in Java side
Bug: 188798284
Test: atest CtsLocationPrivilegedTestCases, also try setting different flags in HAL to see if CTS can be passed.
Change-Id: I231148b62404ee4873da60546eebb75d83fae9a7
Create a new DeviceConfig entry to replace the prior Settings entry on
which the location ignore settings allowlist is based. This allows us to
allowlist based on attribution tag, and eliminate holes for large
applications.
Test: manual + CTS + GTS
Bug: 187421886
Change-Id: I31e61db79b93e202bd8c66efae1bb5aaf0c88ff5
Bug: 187145250
Bug: 188225075
Test: atest CtsLocationPrivilegedTestCases, also try setting different flags in HAL to see if CTS can be passed.
Change-Id: Ie5e11ebd5516dffcf80373805a7b37668f7db8a0