From: kj7.sung Date: Thu, 23 Feb 2017 11:07:25 +0000 (+0900) Subject: Fix to support csharp : mock and passive X-Git-Tag: submit/tizen_3.0/20170224.114452^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F116244%2F1;p=platform%2Fcore%2Fapi%2Flocation-manager.git Fix to support csharp : mock and passive Change-Id: If8fb721f40ecc828a50b80062cc17da7f8fb279e 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); }