bt-service: Disable BT if bluetoothd is terminated 60/139460/1
authorAnurag Biradar <biradar.a@samsung.com>
Wed, 19 Jul 2017 04:58:38 +0000 (10:28 +0530)
committerAnurag Biradar <biradar.a@samsung.com>
Wed, 19 Jul 2017 04:58:38 +0000 (10:28 +0530)
Not able to turn On BT from quick panel

When bluetoothd is terminated and bt-service state is activated then
bt-service is trying to do recover adapter and bt-service changed
state to ACTIVATING and it remain in that state itself.

When bluetoothd is crashed or killed than disable BT completely
instead of recovering the adapter.

Change-Id: Ie25ee80cdf1f89746c3fde18ce2fa9e4c4a54151

bt-service/bt-service-event-receiver.c

index 6b39055..29534d1 100644 (file)
@@ -2937,8 +2937,9 @@ static  void __bt_manager_event_filter(GDBusConnection *connection,
                        BT_INFO_C("### Bluetoothd is terminated");
                        if (_bt_adapter_get_status() != BT_DEACTIVATING &&
                                _bt_adapter_get_status() != BT_DEACTIVATED) {
-                               BT_INFO_C("### Recover it");
-                               _bt_recover_adapter();
+                               BT_INFO_C("Turn Off Bluetooth");
+                               _bt_set_le_disabled(BLUETOOTH_ERROR_NONE);
+                               _bt_disable_cb();
                        }
                        _bt_handle_adapter_removed();
                        __bt_devices_list_free();