Will minimize future changes:
-Never return null GpsStatus to avoid breaking legacy clients
-Allow null location callback complete callbacks
-Return void from sendExtraCommand
-Combine appops and permissions checks into a single helper
-Allow passive provider to remember last locations even when there is
no active passive request.
-Add a couple new injectable helpers to support future changes along
with fakes for testing.
Test: presubmits + manual
Change-Id: If22bee787c5ab5c8c09d20e4742a8b5d1b7f0b59
Discrepency between documented and delivered thread in prior versions
got confused. Switching back to the main thread for delivery when not
specified.
Bug: 160565229
Test: presubmit only
Change-Id: I3461f16278a38082f7101b83e9e23b1e30c949b0
Discrepency between documented and delivered thread in prior versions
got confused. Switching back to the main thread for delivery when not
specified.
Bug: 160565229
Test: presubmit only
Change-Id: I6deaf08e2045771c120aa2eb35c64b392208bd58
Removes the necessity for LMS to call back into client code to inform
the client that a location listener has been removed. This is replaced
with weak references instead, which allows the garbage collector to
handle cleanup instead. This simplifies LMS implementation and makes it
less buggy.
Also includes some rewrites of getCurrentLocation to use a dedicated
AIDL interface now that the onRemoved channel is no longer available,
as well as various other minor refactors.
Test: manual + presubmits
Change-Id: Ic61ce278c44e23bc5da5b703f89f6e656e89dea2
Location permission info is 1) location specific and 2) may change over
time, and thus shouldn't be in CallerIdentity. This CL moves the
information (temporarily) into LocationRequest. Follow up CLs will
include deeper refactors that eliminate the need for this information to
be in LocationRequest as well.
Test: manual + presubmits
Change-Id: I3b4b41941e386f644efce2effe6985b9c865586c
This makes all LM listeners static, saving memory across LM instances in
an application. In addition, listeners for rarely used APIs such as GNSS
APIs are now initialized on-demand to save memory. Finally, the new
transport framework is adopted for location listeners, which means a new
transport object will be used for every location request, eliminating
several edge case bugs around listener removal.
Test: manual + cts
Change-Id: I1f374248baf695323177f347873fed72841f85d0
-Makes geofence manager work synchronously so that testing is not flaky
-Adopts ListenerMultiplexer for geofence listeners so that logic is
shared across location code
-Adds support for location blacklisting and background users
-Substantially reduces the CPU overhead of maintaining listeners
-Adds worksource support to geofencing so power blame is done correctly
-Adds new feature id for geofencing
Test: manual + presubmit
Change-Id: If55bc18f202debf7dd183f0120a24e8f75623ce8
Remove LocationTimeZoneProviderRequest.workSource and correct some docs.
Bug: 152744911
Test: treehugger only
Change-Id: Ibd26886a1c4e66507bbcaafc5132b615e5af443e
Minimal skeleton for location time zone providers. Most behavior has
been stripped and more detail will be added later.
Test: atest services/tests/servicestests/src/android/location/timezone/LocationTimeZoneEventTest.java
Test: services/tests/servicestests/src/com/android/internal/location/timezone/LocationTimeZoneProviderRequestTest.java
Change-Id: I64102df0970e6cfbcc07c9377b226c8663a29a74
-Use more idiomatic and efficient parceling
-Cleanup LocationRequest a bit
Bug: 151026407
Test: presubmits
Change-Id: I3865421a128417a5096e39ee110139a13ab9ab3b
-Add a new app ops helper to make testing easier.
-Consolidate app identity within CallerIdentity class.
-Remove location age restriction for coarse locations, was a bit
arbitrary.
-Remove listener identifiers from LM. These were not being properly
propagated and add a lot of binder overhead with what appears to be
little benefit since we have featureIds, which contain much better
information.
-Remove appops checks from some GNSS APIs that shouldn't require it.
-Move location fudger into location providers and reset them after mock
providers are used so that offset information cannot be leaked.
Bug: 149375028
Test: presubmits + manual
(cherry picked from commit 6033344baa)
Change-Id: I18e2cf3c39836f31d28180e1a4613df4ad675ab7
This saves 24 bytes per serialization and makes code simpler. Also
includes some cleanup in GnssMetrics.
Bug: 152442920
Test: presubmits
Change-Id: I1eb1dfb68190c68e896e87c5bea1f2ec44065e80
Previous versions of GNSS listeners commited to not holding locks even
when running directly unfortunately. We do some extra work to avoid
holding locks while running listeners.
Bug: 151291181
Test: manual
Change-Id: I0b7f46c30df2f97ce11db45b69443a9994885309
- Rename recieverInterSignalBiasNs into interSignalBiasNs, which refers
to the sum of receiver ISB and satellite ISB.
Bug: 150724332
Test: atest GnssMeasurementTest
Change-Id: I322cbe42d24d1f0fe60351c47579323a8715d4d7
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing
For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish
Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing
For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish
Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
For apps that do not target R+, throw SecurityExceptions within
getProvider().
Bug: 150935354
Test: na
Change-Id: I37e9fc1cbcc1cb6ed941c3905ff253d798fc0ac8
Providers no longer need the ability to specify additional packages,
this can be replaced with tracking the provider identity.
In addition, move CallerIdentity into the client space, and fix some
minor GNSS bugs.
Bug: 149839935
Test: atest LocationProviderTest
Change-Id: Ide107abc61531946b20d2ac50cd9555fc215ef03