summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorDavid Christie <dnchrist@google.com>2015-04-14 14:51:42 -0700
committerDavid Christie <dnchrist@google.com>2015-04-14 14:54:48 -0700
commitb80844001442bde6189015b01dc9c6f87a898560 (patch)
tree83db66fad0f13705f229e109694b31a222b0ae62 /core/java/android
parent2eabe5b7a9c396b1d6baebca7505a4e921312fc2 (diff)
downloadframeworks_base-b80844001442bde6189015b01dc9c6f87a898560.zip
frameworks_base-b80844001442bde6189015b01dc9c6f87a898560.tar.gz
frameworks_base-b80844001442bde6189015b01dc9c6f87a898560.tar.bz2
Ensure GeofenceHardware will return capabilities for old implementations.
New FLP HAL implementations will explicitly return their capabilities, but old versions won't (the implicit capability in old versions was GNNS). Ensure that the getCapabilities feature of GeofenceHardware will return GNNS for old binaries, so GmsCore doesn't have to worry about versioning. Change-Id: I4b1c942b0d68d87bfbb18b8c06fd9d8b8f68efa6
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/hardware/location/GeofenceHardwareImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/hardware/location/GeofenceHardwareImpl.java b/core/java/android/hardware/location/GeofenceHardwareImpl.java
index b34c9fb..ee2d43c 100644
--- a/core/java/android/hardware/location/GeofenceHardwareImpl.java
+++ b/core/java/android/hardware/location/GeofenceHardwareImpl.java
@@ -239,7 +239,12 @@ public final class GeofenceHardwareImpl {
case GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE:
return CAPABILITY_GNSS;
case GeofenceHardware.MONITORING_TYPE_FUSED_HARDWARE:
- return mCapabilities;
+ if (mVersion >= FIRST_VERSION_WITH_CAPABILITIES) {
+ return mCapabilities;
+ }
+ // This was the implied capability on old FLP HAL versions that didn't
+ // have the capability callback.
+ return CAPABILITY_GNSS;
}
break;
}