Bug 1152098 - Ignore subsequent toggling requests if toggling is already in progress. r=btian

--HG--
extra : histedit_source : 62052c8ffd607ff9381980a0a4c5cd5af52f9b0a
This commit is contained in:
Shawn Huang 2015-04-14 20:55:00 -04:00
Родитель db3a383adb
Коммит 931df00596
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -571,6 +571,11 @@ BluetoothService::HandleSettingsChanged(nsISupports* aSubject)
MOZ_ASSERT(false, "Expecting a boolean for 'bluetooth.enabled'!");
return NS_ERROR_UNEXPECTED;
}
// Ignore bluetooth toggling request since toggling is already in progress.
if (sToggleInProgress) {
BT_LOGR("Ignore bluetooth toggling request since toggling is already in progress");
return NS_OK;
}
sToggleInProgress = true;