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.
Align the GPS framework with the GPS HAL
b/16374800
Remove localTime field from API
b/16241708
Update Property containers for measurements to use bit masks
b/16238371
Change-Id: Id4db16c3153d0020bf2edb5a67f59353662762d0
- LocationManager.isProviderEnabled() no longer throws SecurityException:
the caller could already circumvent the permission check by calling
Secure.isLocationProviderEnabled()
Change-Id: I5abd04264299671ed35ce4594b5be46d86378767
- Split getStatus() into onGetSummary() and onGetEnabled()
- Call them on app's UI thread
- Allow runtime exceptions to propagate up
- Make a couple of more methods final to prevent subclasses from playing
around with the intent
- Remove explicit timing requirement from javadoc
- Mention that this will be restricted to system-image apps (will be
enforced by the actual settings code)
- b/10461474
Change-Id: Id22dd7a707c05de396ae4c5810e839ca734714c0
- Currently redundant with PROVIDERS_CHANGED_ACTION, but that may
change in the future
- Part of fix for b/10409275
Change-Id: I12daaf20e6546fd9e9dc71c599967fa0ad95e27f