LocationMethod _method = __convert_LocationMethod(method);
int ret = location_is_enabled_method(_method, &is_enabled_val);
if (ret != LOCATION_ERROR_NONE) {
- if (ret == LOCATION_ERROR_NOT_SUPPORTED)
+ if (ret == LOCATION_ERROR_NOT_SUPPORTED) {
+ LOCATIONS_LOGE("LOCATIONS_ERROR_INCORRECT_METHOD");
return LOCATIONS_ERROR_INCORRECT_METHOD;
+ }
return __convert_error_code(ret);
}
}
ret = location_set_mock_location(handle->object, pos, vel, acc);
+ if (ret == LOCATION_ERROR_NOT_SUPPORTED) {
+ LOCATIONS_LOGE("LOCATIONS_ERROR_INCORRECT_METHOD");
+ return LOCATIONS_ERROR_INCORRECT_METHOD;
+ }
location_position_free(pos);
location_velocity_free(vel);
}
ret = location_clear_mock_location(handle->object);
+ if (ret == LOCATION_ERROR_NOT_SUPPORTED) {
+ LOCATIONS_LOGE("LOCATIONS_ERROR_INCORRECT_METHOD");
+ return LOCATIONS_ERROR_INCORRECT_METHOD;
+ }
+
return __convert_error_code(ret);
}