From b86a09596e189cac8e77e7232bab00ee8d4d1412 Mon Sep 17 00:00:00 2001 From: Jiafei Wen Date: Tue, 16 Jul 2013 10:56:52 -0700 Subject: [PATCH] Checking Geofence Mask in gps.conf Check the CAPABILITIES in gps.conf to see if the geofence is enabled or not. If it is not enabled, the function of getting geofence interface will return null. Change-Id: I6500cedd775d83b4701fbe2b3a111c170c8a34be CRs-fixed: 513494 --- loc_api/libloc_api_50001/loc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/loc_api/libloc_api_50001/loc.cpp b/loc_api/libloc_api_50001/loc.cpp index 35a99792..63cf8f43 100644 --- a/loc_api/libloc_api_50001/loc.cpp +++ b/loc_api/libloc_api_50001/loc.cpp @@ -637,7 +637,9 @@ const void* loc_get_extension(const char* name) } else if (strcmp(name, GPS_GEOFENCING_INTERFACE) == 0) { - ret_val = get_geofence_interface(); + if ((gps_conf.CAPABILITIES | GPS_CAPABILITY_GEOFENCING) == gps_conf.CAPABILITIES ){ + ret_val = get_geofence_interface(); + } } else {