mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 921999 - Bluetooth Device connection status in Settings is incorrect if remote headset restores connection, r=gyeh
This commit is contained in:
parent
c6dc57b4db
commit
c5682cb766
@ -676,6 +676,14 @@ BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
|
||||
BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||
|
||||
const nsString& address = aSignal.path();
|
||||
/**
|
||||
* Update sink property only if
|
||||
* - mDeviceAddress is empty (A2dp is disconnected), or
|
||||
* - this property change is from the connected sink.
|
||||
*/
|
||||
NS_ENSURE_TRUE_VOID(mDeviceAddress.IsEmpty() ||
|
||||
mDeviceAddress.Equals(address));
|
||||
|
||||
const InfallibleTArray<BluetoothNamedValue>& arr =
|
||||
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
||||
MOZ_ASSERT(arr.Length() == 1);
|
||||
|
@ -257,6 +257,14 @@ BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
|
||||
MOZ_ASSERT(aSignal.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||
|
||||
const nsString& address = aSignal.path();
|
||||
/**
|
||||
* Update sink property only if
|
||||
* - mDeviceAddress is empty (A2dp is disconnected), or
|
||||
* - this property change is from the connected sink.
|
||||
*/
|
||||
NS_ENSURE_TRUE_VOID(mDeviceAddress.IsEmpty() ||
|
||||
mDeviceAddress.Equals(address));
|
||||
|
||||
const InfallibleTArray<BluetoothNamedValue>& arr =
|
||||
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
||||
MOZ_ASSERT(arr.Length() == 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user