summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/location/FlpHardwareProvider.java8
-rw-r--r--services/jni/com_android_server_location_FlpHardwareProvider.cpp2
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);