Fix to support csharp : mock and passive 44/116244/1 accepted/tizen/3.0/common/20170227.140200 accepted/tizen/3.0/ivi/20170227.070752 accepted/tizen/3.0/mobile/20170227.065815 accepted/tizen/3.0/tv/20170227.070016 accepted/tizen/3.0/wearable/20170227.070403 submit/tizen_3.0/20170224.114452
authorkj7.sung <kj7.sung@samsung.com>
Thu, 23 Feb 2017 11:07:25 +0000 (20:07 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Thu, 23 Feb 2017 11:07:25 +0000 (20:07 +0900)
Change-Id: If8fb721f40ecc828a50b80062cc17da7f8fb279e
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
src/locations.c

index b8e1a8a323818a8e74f604acfa676929701f1dda..ee7c7fc869280f1fc996864185d9e0ba2b369acf 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);
 }