summaryrefslogtreecommitdiff
path: root/src/locations.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/locations.c')
-rwxr-xr-xsrc/locations.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/locations.c b/src/locations.c
index 3fe8cce..270332b 100755
--- a/src/locations.c
+++ b/src/locations.c
@@ -1270,7 +1270,14 @@ EXPORT_API int gps_status_set_satellite_updated_cb(location_manager_h manager, g
LOCATIONS_NULL_ARG_CHECK(callback);
location_manager_s *handle = (location_manager_s *) manager;
- location_set_option(handle->object, "USE_SV");
+ int ret = location_set_option(handle->object, "USE_SV");
+ if (ret != LOCATION_ERROR_NONE) {
+ if (ret == LOCATION_ERROR_NOT_ALLOWED) {
+ LOCATIONS_LOGE("LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED");
+ return LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED;
+ }
+ return ret;
+ }
g_object_set(handle->object, "sat-interval", interval, NULL);
return __set_callback(_LOCATIONS_EVENT_TYPE_SATELLITE, manager, callback, user_data);
}