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
dist_group replaces owner and the default is going to change, set it
to the current default "android" for frameworks/base java_sdk_libraries.
Bug: 186723288
Test: m checkbuild
Change-Id: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
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
Three bugs were present here:
1) isLocationEnabled() will return incorrect results for USER_CURRENT
and USER_CURRENT_OR_SELF
2) Disabling the location enabled cache does not work properly in the
system process, we only disable the cache for a single instance of
LocationManager.
3) isLocationEnabled() was not respecting the user as defined by the
context used to create the LocationManager.
Bug: 185401689
Test: atest CtsLocationFineTestCases
Change-Id: I84bff02604a4b2d84494a0e099e172c4ffb400a2
Updates various docs around location time, and also fixes up some
deprecated method usage.
Bug: 184726840
Test: presubmits
Change-Id: I79365e2a3608c8eaeba954b7c193775e98fb2a91
All the java code used to build the framework jar and run metalava
was previously defined in the toplevel Android.bp files. Move these
into the subdirs where the source actually lives.
This simplifies the rules themselves (no path and needless prefix) and
declutters the top level Android.bp.
Test: m
Change-Id: I97086e309eacb879d16facb8497d9940fa5ddaf6
Also renames *FromMockProvider to *Mock for clarity.
Bug: 183632564
Test: atest CtsLocationFineTestCases
Change-Id: Ic3b2cc2ec69d6a632e347868e7cc53e56e7400b0
Split it up into more generic and useable components that are not as
location specific.
Bug: 182491144
Bug: 181665909
Test: presubmits
Change-Id: I2d6d5e70328657a7430e170531402cb3acbed028
Adds additional logging around user switches, and fixes a bug where
location toggle changes were not logged correctly.
Bug: 183409327
Test: manual
Change-Id: I36fdef5c3eddd3db70d7c18506f82bb687677120
Replace broadcast with listeners in response to API feedback.
Bug: 178714745
Test: atest CtsLocationFineTestCases
Change-Id: Ibb52b167c916fa6b5a9238371ba26b86801389d2
Make tag list nonnull, and rename to extraAttributionTags, and add shell
command support for adding location provider with extra attribution
tags.
Bug: 181254689
Test: presubmits
Change-Id: I52e55094c7043d0e75f902a4177f15e27b018de5
CorrelationVector#getFrequencyOffestMetersPerSecond() should return double.
Bug:179389247
Test: on cuttlefish
Change-Id: I0a999915a0dccb06abb65af68105abd862c14708
The platform has the concept of a location provider which could
be a plugin implemented by another package. The implementation
of a location provider plugin can make calls to APIs that require
a location permission, e.g. fusing data from different sources.
However, such accesses are counted in app ops as a location access
but the accessor is in this case the data source. It is also
possible that the package that provides the implementation of a
location provider also hosts other funcionality which may need to
call APIs that require a location permission.
This change allows a location provider to specify app op attribution
tags which which could be used when calling location to singal to the
OS that the access is for the location providing functionality of the
location provider. For location accesses of the provider package that
are not related to providing location to the OS the provider can use
any other non delcared as location attribution tags. Accesses with
the location attribution tags would be counted in app ops but instead
of towards the OP_COARSE_LOCATION/OP_FINE_LOCATION the would be
counted towards dedicated OP_COARSE_LOCATION_PROVIDER/
OP_FINE_LOCATION_PROVIDER ops. This would allow proper classification
while enabling auditability and tracking via the standard app op APIs.
<meta-data
android:name="android:location_allow_listed_tags"
android:value="foo;bar;baz"/>
Test: atest android.location.cts.fine.LocationManagerFineTest#testLocationAttributionTagBlaming
Bug:179062648
Change-Id: I36739ab42cedc94e1aa7a3bfd3b9aa213f5b3e97