Update radio state after called interrupted callback 60/127460/3 accepted/tizen/4.0/unified/20170816.012755 accepted/tizen/4.0/unified/20170828.223952 accepted/tizen/unified/20170429.024434 submit/tizen/20170428.102059 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100002 tizen_4.0.IoT.p1_release tizen_4.0.m1_release
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 27 Apr 2017 09:47:44 +0000 (18:47 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Fri, 28 Apr 2017 09:07:38 +0000 (18:07 +0900)
[Version] 0.1.8
[Profile] Mobile, Wearable
[Issue Type] Fix bugs

Change-Id: I6bb6c3ac85300c5eff83b5d6e53eca3fb730a5d6

packaging/capi-media-radio.spec
src/radio.c

index d1685e4..ce24b39 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-radio
 Summary:    A Radio library in Tizen Native API
-Version:    0.1.7
+Version:    0.1.8
 Release:    1
 Group:      API/C API
 License:    Apache-2.0
index 3904817..99c8413 100644 (file)
@@ -215,8 +215,11 @@ static int __msg_callback(int message, void *param, void *user_data)
                        ((radio_seek_completed_cb)handle->user_cb[_RADIO_EVENT_TYPE_SEEK_FINISH])(msg->radio_scan.frequency, handle->user_data[_RADIO_EVENT_TYPE_SEEK_FINISH]);
                break;
        case MM_MESSAGE_STATE_INTERRUPTED:
-               if (handle->user_cb[_RADIO_EVENT_TYPE_INTERRUPT])
-                       ((radio_interrupted_cb)handle->user_cb[_RADIO_EVENT_TYPE_INTERRUPT])(__convert_interrupted_code(msg->code), handle->user_data[_RADIO_EVENT_TYPE_INTERRUPT]);
+               if (msg->union_type == MM_MSG_UNION_STATE) {
+                       handle->state = __convert_radio_state(msg->state.current);
+                       if (handle->user_cb[_RADIO_EVENT_TYPE_INTERRUPT])
+                               ((radio_interrupted_cb)handle->user_cb[_RADIO_EVENT_TYPE_INTERRUPT])(__convert_interrupted_code(msg->state.code), handle->user_data[_RADIO_EVENT_TYPE_INTERRUPT]);
+               }
                break;
        case MM_MESSAGE_READY_TO_RESUME:
                if (handle->user_cb[_RADIO_EVENT_TYPE_INTERRUPT])