Fix to support csharp : mock and passive 53/116253/1 accepted/tizen/common/20170227.043245 accepted/tizen/ivi/20170227.050530 accepted/tizen/mobile/20170227.050458 accepted/tizen/tv/20170227.050504 accepted/tizen/unified/20170309.031445 accepted/tizen/wearable/20170227.050508 submit/tizen/20170224.113719 submit/tizen_unified/20170308.100404
authorkj7.sung <kj7.sung@samsung.com>
Thu, 23 Feb 2017 11:11:37 +0000 (20:11 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Thu, 23 Feb 2017 11:11:37 +0000 (20:11 +0900)
Change-Id: I831625aec1f11077fcfcac2246b4bb0e1ccd2ee9
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
src/locations.c

index b8e1a8a..ee7c7fc 100755 (executable)
@@ -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);
 }