The access mock location is no longer a runtime permission. It is a
signature protected one that apps cannot get but the fact they request
it means they want to inject location into the system. Now the user
gets to choose the current mock location app in developer options from
the apps that request the mock location permission. The access to mock
location is no longer guarded by the permisson but from a new app op
which is off by default and the settiings UI sets it to enabled only
for the currently selected mock location app.
bug:21078873
Change-Id: I19e3f9dc7c7de82eab46b30fec1abfbca54a0e59
b/19938206
All new introduced APIs are hidden.
GpsMeasurement#isPseudorangeRateCorrected() is need to properly identify different types
of data provided by different partners. Given the nature of each GPS engine, this change is
required to accomodate the data that can be provided by many partners.
GpsNavigationMessage#getStatus() is required to ensure that the Location process is aware
if the state of the messages, and can act depending on it.
Change-Id: Ie34b1e69bf26a1bde86931ce61168421429bf8f8
It fixes cases when flags where filtered in the platform, because they were
checked as enums.
It also simplies handling of future values in enums/flags.
Change-Id: I83a0f82cc4562749081bf7e279ea52e2d5ba1f7c
A simple GpsStatus object uses 9K of space, given that it initializes an array
of 255 GpsSatellite objects.
This change reduces the memory footprint in the average case, and keeps the
semantics of the API and its GpsSatellite sibling objects without any changes.
In a best case scenario it brings the memory usage per object to 1K.
It's likely in most cases that only 20-50 satellites will be in view. So the
usage should not exceeed half of the original memory usage.
It was considered to keep the internal array but a SparseArray provided bigger
memory savings in the test scenario of ~700B.
Change-Id: Ie2d2144d776a74d4904a08c0d6c5aec6d3bba7cc
The Location.convert() methods do not invert each other as might be
expected. Changing this would introduce breaking changes, so I've
updated the javadocs to make this clearer.
Bug: 13280976
Change-Id: If4bd3c83d5fb67915450849ca471aabc27544dac
The race condition only affects when the client registers for several (all) location listeners.
And the side efects are benign: only the measurement and navigation message status are incurrectly
being sent to the application, but there are no crashes or any real data from GPS being
misscommunicated.
Also:
- cache the last reported status to filter sending notifications when no changes have occurred
- do some cleanup and refactoring in the code changed
Change-Id: I0692e6b70847dc1ee092d7a05a2c6ba3cd9fa147
b/16727892
b/16815124
The listeners are changed to receive statuses asynchronously, this is required because GPS HAL,
requires time to be notified of the capabilities it supports.
Change-Id: Ie69fdd629d8680341386a2c736bc851632dd2bda
* commit '11735a0b759b79e6737b512f69f2efa0603d4e3f':
docs: Modified the notice in the android.location package file to strongly encourage developers to migrate to the Google Play Services Location API.
* commit '6ec5a256d78579057e82691e4cc21ca6222e2b1f':
docs: Modified the notice in the android.location package file to strongly encourage developers to migrate to the Google Play Services Location API.
* commit '4be6fdebdd386dc18159c5557db91936a62f42ab':
docs: Modified the notice in the android.location package file to strongly encourage developers to migrate to the Google Play Services Location API.