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 | |
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')
-rw-r--r-- | services/java/com/android/server/location/FlpHardwareProvider.java | 8 | ||||
-rw-r--r-- | services/jni/com_android_server_location_FlpHardwareProvider.cpp | 2 |
2 files changed, 8 insertions, 2 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); } diff --git a/services/jni/com_android_server_location_FlpHardwareProvider.cpp b/services/jni/com_android_server_location_FlpHardwareProvider.cpp index b403ee6..a187521 100644 --- a/services/jni/com_android_server_location_FlpHardwareProvider.cpp +++ b/services/jni/com_android_server_location_FlpHardwareProvider.cpp @@ -318,7 +318,7 @@ static void TranslateGeofenceFromGeofenceHardwareRequestParcelable( jmethodID getNotificationResponsiveness = env->GetMethodID( geofenceRequestClass, "getNotificationResponsiveness", - "()D"); + "()I"); options->notification_responsivenes_ms = env->CallIntMethod( geofenceRequestObject, getNotificationResponsiveness); |