зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1069868 - Set Bluetooth property |discoverable| to |false| after Bluetooth enabled. r=shuang
Bluetooth scan mode is BT_SCAN_MODE_CONNECTABLE by default, it means it should be connectable and non-discoverable.
This commit is contained in:
Родитель
09ebd52118
Коммит
cbd95cfe18
|
@ -92,10 +92,11 @@ public:
|
|||
sSetPropertyRunnableArray.Clear();
|
||||
sUnbondingRunnableArray.Clear();
|
||||
|
||||
// Bluetooth scan mode is NONE by default
|
||||
// Bluetooth scan mode is SCAN_MODE_CONNECTABLE by default, i.e., It should
|
||||
// be connectable and non-discoverable.
|
||||
NS_ENSURE_TRUE(sBtInterface, NS_ERROR_FAILURE);
|
||||
sBtInterface->SetAdapterProperty(
|
||||
BluetoothNamedValue(NS_ConvertUTF8toUTF16("Discoverable"), true),
|
||||
BluetoothNamedValue(NS_ConvertUTF8toUTF16("Discoverable"), false),
|
||||
new SetAdapterPropertyResultHandler());
|
||||
|
||||
// Try to fire event 'AdapterAdded' to fit the original behaviour when
|
||||
|
|
|
@ -107,10 +107,11 @@ public:
|
|||
sBondingRunnableArray.Clear();
|
||||
sUnbondingRunnableArray.Clear();
|
||||
|
||||
// Bluetooth scan mode is NONE by default
|
||||
// Bluetooth scan mode is SCAN_MODE_CONNECTABLE by default, i.e., It should
|
||||
// be connectable and non-discoverable.
|
||||
NS_ENSURE_TRUE(sBtInterface, NS_ERROR_FAILURE);
|
||||
sBtInterface->SetAdapterProperty(
|
||||
BluetoothNamedValue(NS_ConvertUTF8toUTF16("Discoverable"), true),
|
||||
BluetoothNamedValue(NS_ConvertUTF8toUTF16("Discoverable"), false),
|
||||
new SetAdapterPropertyResultHandler());
|
||||
|
||||
// Trigger BluetoothOppManager to listen
|
||||
|
|
Загрузка…
Ссылка в новой задаче