From 98a6d8aac65b206036852d2a42f01a1ef5ed16c0 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Wed, 16 Nov 2016 14:25:26 +0900 Subject: [PATCH] Change api description and doesn't change state after scan_stop. [Version] 0.1.7 [Profile] Mobile, Wearable [Issue Type] Fix bugs Change-Id: I0d34b52307a4137747d2c1e301d695ef0767f201 --- include/radio.h | 2 +- packaging/capi-media-radio.spec | 2 +- src/radio.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/radio.h b/include/radio.h index ce4a957..a12d77c 100755 --- a/include/radio.h +++ b/include/radio.h @@ -331,7 +331,7 @@ int radio_scan_start(radio_h radio, radio_scan_updated_cb callback, void *user_d * @retval #RADIO_ERROR_NOT_SUPPORTED Not supported * @pre The radio state must be set to #RADIO_STATE_SCANNING by calling radio_scan_start(). * @post It invokes radio_scan_stopped_cb() when the scan stops. - * @post The radio state will be #RADIO_STATE_READY. + * @post After the scan stopped, the radio state will be set back to the state from before the radio_scan_start() fuction call(#RADIO_STATE_READY or #RADIO_STATE_PLAYING). * @see radio_scan_start() */ int radio_scan_stop(radio_h radio, radio_scan_stopped_cb callback, void *user_data); diff --git a/packaging/capi-media-radio.spec b/packaging/capi-media-radio.spec index 8df2374..36d2082 100644 --- a/packaging/capi-media-radio.spec +++ b/packaging/capi-media-radio.spec @@ -1,6 +1,6 @@ Name: capi-media-radio Summary: A Radio library in Tizen Native API -Version: 0.1.6 +Version: 0.1.7 Release: 1 Group: API/C API License: Apache-2.0 diff --git a/src/radio.c b/src/radio.c index 5fd19f3..3904817 100644 --- a/src/radio.c +++ b/src/radio.c @@ -504,12 +504,10 @@ int radio_scan_stop(radio_h radio, radio_scan_stopped_cb callback, void *user_da __unset_callback(_RADIO_EVENT_TYPE_SCAN_STOP, radio); int ret = mm_radio_scan_stop(handle->mm_handle); - if (ret != MM_ERROR_NONE) { + if (ret != MM_ERROR_NONE) return __convert_error_code(ret, (char *)__FUNCTION__); - } else { - handle->state = RADIO_STATE_READY; + else return RADIO_ERROR_NONE; - } } int radio_set_mute(radio_h radio, bool muted) -- 2.7.4