Expose provider identification methods that allow for attribution tag to
be provided in addition to the package.
Bug: 177239114
Test: manual
Change-Id: Id0247a3f2a27f8d4897fd28644a34f783bd10d84
This allows third party location providers to link against the standard
API surface. This replaces the LocationProviderBase implementation in
the com.android.location.providers API. Both will temporarily coexist
until third party applications can be migrated, and then old version
will be removed. Only the LocationProviderBase API is migrated right now
as its the only API that has undergone changes.
This also restores some old, unused classes which should not have been
remove from the API surface. Clients that support older API version will
still need to link against these classes.
Bug: 176115245
Test: builds
Change-Id: I2d688447e1f59e441f5c48ff36d3f0dd8b5dc7f6
Provide a system wide broadcast when GNSS capabilities change and when
GNSS antenna infos change so that clients have some way to detect this.
Antenna info was previously implemented as a listener, but after
evaluating the information, it is not protected, changes infrequently
with device configuration (if a foldable is unfolded for instance), and
clients need to see every change (not the previous model of only sending
changes while the client is foreground and GPS is enabled).
As a corollary, deprecate GNSS status events. These status messages
contain duplicate, inconsistent information, and do not scale for new
APIs. In addition, we don't have any clients that use these status
messages for any real purpose.
Bug: 153129152
Test: atest CtsLocationFineTestCases
Change-Id: Icc5bed8e37c7e8f168de57d2a019e94d96c0d3f2
Extracts large parts of the GNSS HAL into a central GnssNative class,
which can be faked for testing. This is a large step towards making all
GNSS code unit testable, and allows for more modular HAL configurations.
Begins to break up the GnssLocationProvider god object and pull
functionality out into other classes. Changes include:
-Making GnssCapabilities parcelable so it can be part of the API
-Splitting out the NMEA listener from status listeners, which
substantially reduces the burden of supported NMEA listeners as well as
the amount of GNSS<->AP communication.
-All GNSS listeners now respond properly to HAL restarts.
-Partially extract out emergency call detection.
Bug: 153129152
Test: manual
Change-Id: Idee0d548f38c6adf921cd6c28b5d815bbd366f8a
Delete location.timezone.provider API classes and associated internal
classes that are no longer used.
Bug: 175633818
Test: build
Change-Id: I66319e63e3150e3b71f31f8d9404e4114f802662
LocationProvider cannot represent unknown properties, which is currently
causing problems with getProvider() which may return null even when a
particular provider exists. Instead provide isProvider() to query
whether a provider exists, and getProviderProperties() to query a
provider's properties.
Bug: 176232308
Test: atest CtsLocationNoneTestCases
Change-Id: Ic42cc953624be116616b0b997e18356247fdf288
Expose the fused provider publicly, and change API results to reflect
this.
Bug: 174580458
Test: none
Change-Id: I61956fbe2b15d1c0c19f6ca2b6ff435146625e9f
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Creates a new LastLocationRequest object similar to LocationRequest,
specifically for useage with the getLastLocation() APIs. This allows
SystemApi clients to pass in important parameters like
locationSettingsIgnored, etc...
Bug: 173666111
Test: manual + presubmits
Change-Id: I2e0253e5275d9d17cfb5a9243de0ef12ab33348c
Switch LocationTimeZoneEvent to elapsedRealtimeMillis from nanos. This
makes it more consistent with other usages of the elapsed realtime clock
in time zone detection. This information is currently only used for
debug so there will be no functional change.
Also change LocationTimeZoneEvent toString() to additionally report
mElapsedRealtimeMillis value using Duration.toString(); this is done
elsewhere in debug output for time zone detection so makes understanding
log output easier.
Bug: 169304499
Test: build only
Change-Id: If307c9b27d64ca49a4fcc0d9bb6e36f362990b3e
LocationTimeZoneEvent was originally supposed to fulfil the same role as
Location does in the LocationProvider. Since Location is public SDK, it
was in android.location. LocationTimeZoneEvent is not public SDK (or any
form of API), so it can be moved to com.android instead.
LocationTimeZoneEventUnbundled is in the API in its place.
Bug: 169304499
Test: treehugger only
Change-Id: I5d382362383000b16852928895a18ac4e4269a8f
Adds additional logic for location requests coming from the system
server, such that those requests may allowed so long as location is on
for the current user, even if the system user has location disabled.
Even though the system server runs under the system user, it may need
to service requests from or on behalf of other users.
Test: presubmits + manual
Change-Id: Ic9d7762e75fc930b7d26f1d1bf20b272d562939c
This should always have been SystemApi, as most fused providers are
implemented outside system server. There is a strong argument this
should actually be public API, but I'm punting on that for now until we
can give it more consideration.
Bug: 173030969
Test: none
Change-Id: If5ba10accbe2f6ce47d749536d053e1bd8e297f8
-Moves batching APIs from SystemApi to Public, and makes them
multi-client safe.
-Adds equals/hashcode to Location.
Bug: 171512333
Test: manual + presubmit
Change-Id: I6ee28f8229fdf49386cd370ea785de63b97e7cde
It causes problems with permissions in testing and isn't strictly
required so it can be removed.
Bug: 152744911
Bug: 149014708
Test: atest services/tests/servicestests/src/android/location/timezone/LocationTimeZoneEventTest.java
Change-Id: Iba9c07780e3cc9f94f2c77144c48916236f31e60
Geocoder APIs are a mess, but this will at least validate the caller
properly, and pass the relevant information along to clients.
Bug: 158318462
Test: presubmits
Change-Id: I47b09962598a2346bd79caa643ba1d83069c0c19
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.
APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7