Merge "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" into klp-dev
This commit is contained in:
@@ -141,10 +141,16 @@ public class FlpHardwareProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onGeofenceMonitorStatus(int status, int source, Location location) {
|
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(
|
getGeofenceHardwareSink().reportGeofenceMonitorStatus(
|
||||||
GeofenceHardware.MONITORING_TYPE_FUSED_HARDWARE,
|
GeofenceHardware.MONITORING_TYPE_FUSED_HARDWARE,
|
||||||
status,
|
status,
|
||||||
updateLocationInformation(location),
|
updatedLocation,
|
||||||
source);
|
source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ static void TranslateGeofenceFromGeofenceHardwareRequestParcelable(
|
|||||||
jmethodID getNotificationResponsiveness = env->GetMethodID(
|
jmethodID getNotificationResponsiveness = env->GetMethodID(
|
||||||
geofenceRequestClass,
|
geofenceRequestClass,
|
||||||
"getNotificationResponsiveness",
|
"getNotificationResponsiveness",
|
||||||
"()D");
|
"()I");
|
||||||
options->notification_responsivenes_ms = env->CallIntMethod(
|
options->notification_responsivenes_ms = env->CallIntMethod(
|
||||||
geofenceRequestObject,
|
geofenceRequestObject,
|
||||||
getNotificationResponsiveness);
|
getNotificationResponsiveness);
|
||||||
|
|||||||
Reference in New Issue
Block a user