From: kj7.sung Date: Thu, 23 Feb 2017 11:11:37 +0000 (+0900) Subject: Fix to support csharp : mock and passive X-Git-Tag: submit/tizen/20170224.113719^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0580b0b1f65580aa608fbb205cb257049f28d99e;p=platform%2Fcore%2Fapi%2Flocation-manager.git Fix to support csharp : mock and passive Change-Id: I831625aec1f11077fcfcac2246b4bb0e1ccd2ee9 Signed-off-by: kj7.sung --- diff --git a/src/locations.c b/src/locations.c index b8e1a8a..ee7c7fc 100755 --- a/src/locations.c +++ b/src/locations.c @@ -414,8 +414,10 @@ EXPORT_API int location_manager_is_enabled_method(location_method_e method, bool 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); } @@ -1597,6 +1599,10 @@ EXPORT_API int location_manager_set_mock_location(location_manager_h manager, co } 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); @@ -1623,5 +1629,10 @@ EXPORT_API int location_manager_clear_mock_location(location_manager_h manager) } 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); }