diff options
author | destradaa <destradaa@google.com> | 2013-09-11 12:42:51 -0700 |
---|---|---|
committer | destradaa <destradaa@google.com> | 2013-09-11 12:42:51 -0700 |
commit | 839904eed81bf9cd87c27de49903dddb64ae3937 (patch) | |
tree | 911dcad6e4c172f831ea9999e8d9c45188a79e83 /services/java/com/android/server/location/FlpHardwareProvider.java | |
parent | 23e2bba4e17662e941c2c6672f66249aff4a0470 (diff) | |
download | frameworks_base-839904eed81bf9cd87c27de49903dddb64ae3937.zip frameworks_base-839904eed81bf9cd87c27de49903dddb64ae3937.tar.gz frameworks_base-839904eed81bf9cd87c27de49903dddb64ae3937.tar.bz2 |
Fix exceptions in the Flp Hal layer:
- JNI exception accessing a geofence method with wrong signature
- FlpHardwareProvider exception when the monitoring status contains no location information
Bug: 10691492
Change-Id: I1959712912af712dc9dc344f20afd1112da46efc
Diffstat (limited to 'services/java/com/android/server/location/FlpHardwareProvider.java')
-rw-r--r-- | services/java/com/android/server/location/FlpHardwareProvider.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/services/java/com/android/server/location/FlpHardwareProvider.java b/services/java/com/android/server/location/FlpHardwareProvider.java index ebeccfb..60893b8 100644 --- a/services/java/com/android/server/location/FlpHardwareProvider.java +++ b/services/java/com/android/server/location/FlpHardwareProvider.java @@ -141,10 +141,16 @@ public class FlpHardwareProvider { } private void onGeofenceMonitorStatus(int status, int source, Location location) { + // allow the location to be optional in this event + Location updatedLocation = null; + if(location != null) { + updatedLocation = updateLocationInformation(location); + } + getGeofenceHardwareSink().reportGeofenceMonitorStatus( GeofenceHardware.MONITORING_TYPE_FUSED_HARDWARE, status, - updateLocationInformation(location), + updatedLocation, source); } |