Fix BT routing issue when BT device is disconnected 64/93464/1
authorWootak Jung <wootak.jung@samsung.com>
Mon, 24 Oct 2016 10:17:16 +0000 (19:17 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 24 Oct 2016 10:17:16 +0000 (19:17 +0900)
BT device should be removed after BT disconnected

Change-Id: Ia9473de0e36727287fd256a6cb4d3e799edfabff

packaging/call-manager.spec
service/src/callmgr-core.c
service/src/callmgr-dbus.c

index 85c8cca..cb6cc2c 100755 (executable)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 77
+%define patchlevel 78
 %define ext_feature 0
 
 Name:           call-manager
index bd9d0dd..9027f33 100644 (file)
@@ -1670,10 +1670,15 @@ static void __callmgr_core_process_audio_events(cm_audio_event_type_e event_type
                        break;
                case CM_AUDIO_EVENT_BT_CHANGED_E:
                        {
-                               if (core_data->active_dial || core_data->held)
-                                       _callmgr_audio_set_audio_route(core_data->audio_handle, CALLMGR_AUDIO_ROUTE_BT_E);
-                               else
+                               int is_connected = GPOINTER_TO_INT(event_data);
+                               if (core_data->active_dial || core_data->held) {
+                                       if (is_connected)
+                                               _callmgr_audio_set_audio_route(core_data->audio_handle, CALLMGR_AUDIO_ROUTE_BT_E);
+                                       else
+                                               __callmgr_core_set_default_audio_route(core_data);
+                               } else {
                                        info("No active call. Ignore");
+                               }
                        }
                        break;
                default:
index fd05091..7651216 100644 (file)
@@ -286,7 +286,7 @@ static gboolean __bluetooth_off_handler (GDBusInterfaceSkeleton *di,
                GDBusMethodInvocation *invoc, gpointer user_data)
 {
        int err = -1;
-       dbg("_set_extra_vol_handler() is called");
+       dbg("__bluetooth_off_handler() is called");
        callmgr_core_data_t *core_data = (callmgr_core_data_t *)user_data;
        CM_RETURN_VAL_IF_FAIL(core_data, FALSE);