diff --git a/dom/bluetooth/BluetoothService.cpp b/dom/bluetooth/BluetoothService.cpp index 3699517f32f9..0b31ef6b7d65 100644 --- a/dom/bluetooth/BluetoothService.cpp +++ b/dom/bluetooth/BluetoothService.cpp @@ -145,6 +145,19 @@ public: { MOZ_ASSERT(NS_IsMainThread()); + // This is requested in Bug 836516. With settings this property, WLAN + // firmware could be aware of Bluetooth has been turned on/off, so that the + // mecahnism of handling coexistence of WIFI and Bluetooth could be started. + // + // In the future, we may have our own way instead of setting a system + // property to let firmware developers be able to sense that Bluetooth has + // been toggled. +#if defined(MOZ_WIDGET_GONK) + if (property_set(PROP_BLUETOOTH_ENABLED, mEnabled ? "true" : "false") != 0) { + BT_WARNING("Failed to set bluetooth enabled property"); + } +#endif + NS_ENSURE_TRUE(sBluetoothService, NS_OK); if (sInShutdown) { @@ -215,19 +228,6 @@ public: } } - // This is requested in Bug 836516. With settings this property, WLAN - // firmware could be aware of Bluetooth has been turned on/off, so that the - // mecahnism of handling coexistence of WIFI and Bluetooth could be started. - // - // In the future, we may have our own way instead of setting a system - // property to let firmware developers be able to sense that Bluetooth has - // been toggled. -#if defined(MOZ_WIDGET_GONK) - if (property_set(PROP_BLUETOOTH_ENABLED, mEnabled ? "true" : "false") != 0) { - BT_WARNING("Failed to set bluetooth enabled property"); - } -#endif - nsCOMPtr ackTask = new BluetoothService::ToggleBtAck(mEnabled); if (NS_FAILED(NS_DispatchToMainThread(ackTask))) { BT_WARNING("Failed to dispatch to main thread!");