LocationMethod _method = __convert_LocationMethod(method);
int ret = LOCATION_ERROR_NONE;
- if (_method == LOCATION_METHOD_NONE)
+ if (_method == LOCATION_METHOD_NONE) {
return __convert_error_code(LOCATION_ERROR_PARAMETER);
+ } else if (_method == LOCATION_METHOD_PASSIVE) {
+ LOCATIONS_LOGE("LOCATIONS_ERROR_INCORRECT_METHOD");
+ return LOCATIONS_ERROR_INCORRECT_METHOD;
+ }
g_location_setting[_method].callback = callback;
g_location_setting[_method].user_data = user_data;
LocationMethod _method = __convert_LocationMethod(method);
int ret = LOCATION_ERROR_NONE;
- if (_method == LOCATION_METHOD_NONE)
+ if (_method == LOCATION_METHOD_NONE) {
return __convert_error_code(LOCATION_ERROR_PARAMETER);
+ } else if (_method == LOCATION_METHOD_PASSIVE) {
+ LOCATIONS_LOGE("LOCATIONS_ERROR_INCORRECT_METHOD");
+ return LOCATIONS_ERROR_INCORRECT_METHOD;
+ }
ret = location_ignore_setting_notify(_method, __setting_changed_cb);
if (ret != LOCATION_ERROR_NONE) {