diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml
index 4da42d3bb776..ad8f3366c9ce 100644
--- a/b2g/config/aries/sources.xml
+++ b/b2g/config/aries/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml
index b15e4f0b0c81..25850324dfdc 100644
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index ae9f9a7950a8..9bf3c7ae27c4 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index 6affbb41488f..1f82285c717d 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index 69e4e1c26960..2b7e6441ebe6 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml
index 876b0506517c..911bb2134fec 100644
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index ae9f9a7950a8..9bf3c7ae27c4 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml
index e726132e1dff..9e622c1bd26f 100644
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index bfd49bf222e5..e8e164522257 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
{
"git": {
- "git_revision": "1e1197e0e8e64307aa382ffba4711d1c661de7ca",
+ "git_revision": "331956d992ec4231fd19980201e86fd0d3067b2a",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
- "revision": "017d8581cedcf164da2a6e2b6b4fbb98188325f0",
+ "revision": "27d3020c9da9f6c438bd97b3d42d9124ec9807f4",
"repo_path": "integration/gaia-central"
}
diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml
index ed2eeeee7545..3219fa6b6e84 100644
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml
index e68d59ba85ef..c73ffc128260 100644
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/dom/bluetooth/BluetoothHidManager.cpp b/dom/bluetooth/BluetoothHidManager.cpp
index b5e9a1ad9115..e945ce326bd8 100644
--- a/dom/bluetooth/BluetoothHidManager.cpp
+++ b/dom/bluetooth/BluetoothHidManager.cpp
@@ -146,14 +146,16 @@ BluetoothHidManager::Disconnect(BluetoothProfileController* aController)
BluetoothService* bs = BluetoothService::Get();
if (!bs) {
if (aController) {
- aController->NotifyCompletion(NS_LITERAL_STRING(ERR_NO_AVAILABLE_RESOURCE));
+ aController->NotifyCompletion(
+ NS_LITERAL_STRING(ERR_NO_AVAILABLE_RESOURCE));
}
return;
}
if (!mConnected) {
if (aController) {
- aController->NotifyCompletion(NS_LITERAL_STRING(ERR_ALREADY_DISCONNECTED));
+ aController->NotifyCompletion(
+ NS_LITERAL_STRING(ERR_ALREADY_DISCONNECTED));
}
return;
}
@@ -210,7 +212,8 @@ void
BluetoothHidManager::HandleInputPropertyChanged(const BluetoothSignal& aSignal)
{
MOZ_ASSERT(NS_IsMainThread());
- MOZ_ASSERT(aSignal.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue);
+ MOZ_ASSERT(aSignal.value().type() ==
+ BluetoothValue::TArrayOfBluetoothNamedValue);
const InfallibleTArray& arr =
aSignal.value().get_ArrayOfBluetoothNamedValue();
diff --git a/dom/bluetooth/BluetoothInterface.h b/dom/bluetooth/BluetoothInterface.h
index acab86c1039b..9e4a1b0d557f 100644
--- a/dom/bluetooth/BluetoothInterface.h
+++ b/dom/bluetooth/BluetoothInterface.h
@@ -481,7 +481,8 @@ public:
const BluetoothAvrcpNotificationParam& aParam,
BluetoothAvrcpResultHandler* aRes) = 0;
- virtual void SetVolume(uint8_t aVolume, BluetoothAvrcpResultHandler* aRes) = 0;
+ virtual void SetVolume(uint8_t aVolume,
+ BluetoothAvrcpResultHandler* aRes) = 0;
protected:
BluetoothAvrcpInterface();
@@ -1073,7 +1074,8 @@ public:
virtual void DiscoveryStateChangedNotification(bool aState) { }
virtual void PinRequestNotification(const nsAString& aRemoteBdAddr,
- const nsAString& aBdName, uint32_t aCod) { }
+ const nsAString& aBdName,
+ uint32_t aCod) { }
virtual void SspRequestNotification(const nsAString& aRemoteBdAddr,
const nsAString& aBdName,
uint32_t aCod,
diff --git a/dom/bluetooth/BluetoothProfileManagerBase.h b/dom/bluetooth/BluetoothProfileManagerBase.h
index c90a51ee1958..5f3ba92b4653 100644
--- a/dom/bluetooth/BluetoothProfileManagerBase.h
+++ b/dom/bluetooth/BluetoothProfileManagerBase.h
@@ -50,12 +50,12 @@ public:
virtual void OnUpdateSdpRecords(const nsAString& aDeviceAddress) = 0;
/**
- * Returns the address of the connected device.
+ * Return the address of the connected device.
*/
virtual void GetAddress(nsAString& aDeviceAddress) = 0;
/**
- * Returns true if the profile is connected.
+ * Return true if the profile is connected.
*/
virtual bool IsConnected() = 0;
@@ -84,7 +84,7 @@ public:
virtual void Reset() = 0;
/**
- * Returns string of profile name.
+ * Return string of profile name.
*/
virtual void GetName(nsACString& aName) = 0;
};
@@ -103,7 +103,7 @@ public: \
BluetoothProfileController* aController) override; \
virtual void Disconnect(BluetoothProfileController* aController) override; \
virtual void OnConnect(const nsAString& aErrorStr) override; \
- virtual void OnDisconnect(const nsAString& AErrorStr) override; \
+ virtual void OnDisconnect(const nsAString& aErrorStr) override; \
virtual void Reset() override;
END_BLUETOOTH_NAMESPACE
diff --git a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp
index efd6a470f766..d0fb96b84f51 100644
--- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp
@@ -561,14 +561,16 @@ BluetoothA2dpManager::Disconnect(BluetoothProfileController* aController)
BluetoothService* bs = BluetoothService::Get();
if (!bs) {
if (aController) {
- aController->NotifyCompletion(NS_LITERAL_STRING(ERR_NO_AVAILABLE_RESOURCE));
+ aController->NotifyCompletion(
+ NS_LITERAL_STRING(ERR_NO_AVAILABLE_RESOURCE));
}
return;
}
if (!mA2dpConnected) {
if (aController) {
- aController->NotifyCompletion(NS_LITERAL_STRING(ERR_ALREADY_DISCONNECTED));
+ aController->NotifyCompletion(
+ NS_LITERAL_STRING(ERR_ALREADY_DISCONNECTED));
}
return;
}
@@ -580,7 +582,8 @@ BluetoothA2dpManager::Disconnect(BluetoothProfileController* aController)
if (!sBtA2dpInterface) {
BT_LOGR("sBluetoothA2dpInterface is null");
if (aController) {
- aController->NotifyCompletion(NS_LITERAL_STRING(ERR_NO_AVAILABLE_RESOURCE));
+ aController->NotifyCompletion(
+ NS_LITERAL_STRING(ERR_NO_AVAILABLE_RESOURCE));
}
return;
}
@@ -1011,8 +1014,8 @@ BluetoothA2dpManager::GetArtist(nsAString& aArtist)
*/
void
-BluetoothA2dpManager::ConnectionStateNotification(BluetoothA2dpConnectionState aState,
- const nsAString& aBdAddr)
+BluetoothA2dpManager::ConnectionStateNotification(
+ BluetoothA2dpConnectionState aState, const nsAString& aBdAddr)
{
MOZ_ASSERT(NS_IsMainThread());
diff --git a/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp b/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp
index 1505616a5e10..5b817169f77c 100644
--- a/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp
@@ -2521,7 +2521,8 @@ BluetoothDaemonGattClientInterface::Listen(
/* Clear the attribute cache for a given device*/
void
BluetoothDaemonGattClientInterface::Refresh(
- int aClientIf, const nsAString& aBdAddr, BluetoothGattClientResultHandler* aRes)
+ int aClientIf, const nsAString& aBdAddr,
+ BluetoothGattClientResultHandler* aRes)
{
MOZ_ASSERT(mModule);
diff --git a/dom/bluetooth/bluedroid/BluetoothDaemonHandsfreeInterface.cpp b/dom/bluetooth/bluedroid/BluetoothDaemonHandsfreeInterface.cpp
index 42a977564374..4873147add35 100644
--- a/dom/bluetooth/bluedroid/BluetoothDaemonHandsfreeInterface.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonHandsfreeInterface.cpp
@@ -40,8 +40,8 @@ BluetoothDaemonHandsfreeModule::Send(DaemonSocketPDU* aPDU,
}
void
-BluetoothDaemonHandsfreeModule::HandleSvc(const DaemonSocketPDUHeader& aHeader,
- DaemonSocketPDU& aPDU, void* aUserData)
+BluetoothDaemonHandsfreeModule::HandleSvc(
+ const DaemonSocketPDUHeader& aHeader, DaemonSocketPDU& aPDU, void* aUserData)
{
static void (BluetoothDaemonHandsfreeModule::* const HandleOp[])(
const DaemonSocketPDUHeader&, DaemonSocketPDU&, void*) = {
diff --git a/dom/bluetooth/bluedroid/BluetoothGattManager.cpp b/dom/bluetooth/bluedroid/BluetoothGattManager.cpp
index e1418029bede..eaf7d6af1fcc 100644
--- a/dom/bluetooth/bluedroid/BluetoothGattManager.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothGattManager.cpp
@@ -1173,7 +1173,8 @@ BluetoothGattManager::WriteCharacteristicValue(
return;
}
- client->mWriteCharacteristicState.Assign(aWriteType, aValue, false, aRunnable);
+ client->mWriteCharacteristicState.Assign(
+ aWriteType, aValue, false, aRunnable);
/**
* First, write the characteristic value through an unauthenticated physical
diff --git a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp b/dom/bluetooth/bluedroid/BluetoothOppManager.cpp
index 5523bfcba735..1652794e1f11 100644
--- a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothOppManager.cpp
@@ -1551,11 +1551,14 @@ BluetoothOppManager::OnSocketDisconnect(BluetoothSocket* aSocket)
*/
if (!mSuccessFlag) {
if (mIsServer) {
+ // Remove received file and inform gaia of receiving failure
DeleteReceivedFile();
- }
-
- FileTransferComplete();
- if (!mIsServer) {
+ FileTransferComplete();
+ } else {
+ // Inform gaia of current blob transfer failure
+ if (mCurrentBlobIndex >= 0) {
+ FileTransferComplete();
+ }
// Inform gaia of remaining blobs' sending failure
DiscardBlobsToSend();
}
diff --git a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
index 218dd48388d2..b689c16c4abb 100644
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
@@ -600,8 +600,8 @@ class BluetoothServiceBluedroid::GetDeviceRequest final
{
public:
GetDeviceRequest(int aDeviceCount, BluetoothReplyRunnable* aRunnable)
- : mDeviceCount(aDeviceCount)
- , mRunnable(aRunnable)
+ : mDeviceCount(aDeviceCount)
+ , mRunnable(aRunnable)
{ }
int mDeviceCount;
@@ -617,8 +617,8 @@ public:
GetRemoteDevicePropertiesResultHandler(
nsTArray& aRequests,
const nsAString& aDeviceAddress)
- : mRequests(aRequests)
- , mDeviceAddress(aDeviceAddress)
+ : mRequests(aRequests)
+ , mDeviceAddress(aDeviceAddress)
{ }
void OnError(BluetoothStatus aStatus) override
@@ -640,7 +640,7 @@ public:
}
private:
- nsTArray mRequests;
+ nsTArray& mRequests;
nsString mDeviceAddress;
};
@@ -706,26 +706,29 @@ BluetoothServiceBluedroid::GetPairedDevicePropertiesInternal(
return NS_OK;
}
-class BluetoothServiceBluedroid::StartDiscoveryResultHandler final
+class BluetoothServiceBluedroid::DispatchReplyErrorResultHandler final
: public BluetoothResultHandler
{
public:
- StartDiscoveryResultHandler(
+ DispatchReplyErrorResultHandler(
nsTArray>& aRunnableArray,
BluetoothReplyRunnable* aRunnable)
- : mRunnableArray(aRunnableArray)
- , mRunnable(aRunnable)
+ : mRunnableArray(aRunnableArray)
+ , mRunnable(aRunnable)
{ }
void OnError(BluetoothStatus aStatus) override
{
MOZ_ASSERT(NS_IsMainThread());
+
mRunnableArray.RemoveElement(mRunnable);
- DispatchReplyError(mRunnable, aStatus);
+ if (mRunnable) {
+ DispatchReplyError(mRunnable, aStatus);
+ }
}
private:
- nsTArray> mRunnableArray;
+ nsTArray>& mRunnableArray;
BluetoothReplyRunnable* mRunnable;
};
@@ -738,55 +741,9 @@ BluetoothServiceBluedroid::StartDiscoveryInternal(
mChangeDiscoveryRunnables.AppendElement(aRunnable);
sBtInterface->StartDiscovery(
- new StartDiscoveryResultHandler(mChangeDiscoveryRunnables, aRunnable));
+ new DispatchReplyErrorResultHandler(mChangeDiscoveryRunnables, aRunnable));
}
-class BluetoothServiceBluedroid::CancelDiscoveryResultHandler final
- : public BluetoothResultHandler
-{
-public:
- CancelDiscoveryResultHandler(
- nsTArray>& aRunnableArray,
- BluetoothReplyRunnable* aRunnable)
- : mRunnableArray(aRunnableArray)
- , mRunnable(aRunnable)
- { }
-
- void OnError(BluetoothStatus aStatus) override
- {
- MOZ_ASSERT(NS_IsMainThread());
- mRunnableArray.RemoveElement(mRunnable);
- DispatchReplyError(mRunnable, aStatus);
- }
-
-private:
- nsTArray> mRunnableArray;
- BluetoothReplyRunnable* mRunnable;
-};
-
-class BluetoothServiceBluedroid::GetRemoteServicesResultHandler final
- : public BluetoothResultHandler
-{
-public:
- GetRemoteServicesResultHandler(
- nsTArray>& aRunnableArray,
- BluetoothReplyRunnable* aRunnable)
- : mRunnableArray(aRunnableArray)
- , mRunnable(aRunnable)
- { }
-
- void OnError(BluetoothStatus aStatus) override
- {
- MOZ_ASSERT(NS_IsMainThread());
- mRunnableArray.RemoveElement(mRunnable);
- DispatchReplyError(mRunnable, aStatus);
- }
-
-private:
- nsTArray> mRunnableArray;
- BluetoothReplyRunnable* mRunnable;
-};
-
nsresult
BluetoothServiceBluedroid::FetchUuidsInternal(
const nsAString& aDeviceAddress, BluetoothReplyRunnable* aRunnable)
@@ -800,14 +757,12 @@ BluetoothServiceBluedroid::FetchUuidsInternal(
* if it is currently discovering nearby remote devices.
*/
if (mDiscovering) {
- sBtInterface->CancelDiscovery(
- new CancelDiscoveryResultHandler(mChangeDiscoveryRunnables, aRunnable));
+ StopDiscoveryInternal(aRunnable);
}
mFetchUuidsRunnables.AppendElement(aRunnable);
-
sBtInterface->GetRemoteServices(aDeviceAddress,
- new GetRemoteServicesResultHandler(mFetchUuidsRunnables, aRunnable));
+ new DispatchReplyErrorResultHandler(mFetchUuidsRunnables, aRunnable));
return NS_OK;
}
@@ -817,38 +772,14 @@ BluetoothServiceBluedroid::StopDiscoveryInternal(
BluetoothReplyRunnable* aRunnable)
{
MOZ_ASSERT(NS_IsMainThread());
+
ENSURE_BLUETOOTH_IS_READY_VOID(aRunnable);
mChangeDiscoveryRunnables.AppendElement(aRunnable);
sBtInterface->CancelDiscovery(
- new CancelDiscoveryResultHandler(mChangeDiscoveryRunnables,
- aRunnable));
+ new DispatchReplyErrorResultHandler(mChangeDiscoveryRunnables, aRunnable));
}
-class BluetoothServiceBluedroid::SetAdapterPropertyResultHandler final
- : public BluetoothResultHandler
-{
-public:
- SetAdapterPropertyResultHandler(
- nsTArray>& aRunnableArray,
- BluetoothReplyRunnable* aRunnable)
- : mRunnableArray(aRunnableArray)
- , mRunnable(aRunnable)
- { }
-
- void OnError(BluetoothStatus aStatus) override
- {
- MOZ_ASSERT(NS_IsMainThread());
-
- mRunnableArray.RemoveElement(mRunnable);
- DispatchReplyError(mRunnable, aStatus);
- }
-
-private:
- nsTArray> mRunnableArray;
- BluetoothReplyRunnable* mRunnable;
-};
-
nsresult
BluetoothServiceBluedroid::SetProperty(BluetoothObjectType aType,
const BluetoothNamedValue& aValue,
@@ -859,9 +790,8 @@ BluetoothServiceBluedroid::SetProperty(BluetoothObjectType aType,
ENSURE_BLUETOOTH_IS_READY(aRunnable, NS_OK);
mSetAdapterPropertyRunnables.AppendElement(aRunnable);
-
sBtInterface->SetAdapterProperty(aValue,
- new SetAdapterPropertyResultHandler(mSetAdapterPropertyRunnables,
+ new DispatchReplyErrorResultHandler(mSetAdapterPropertyRunnables,
aRunnable));
return NS_OK;
@@ -884,30 +814,6 @@ BluetoothServiceBluedroid::UpdateSdpRecords(
return true;
}
-class BluetoothServiceBluedroid::CreateBondResultHandler final
- : public BluetoothResultHandler
-{
-public:
- CreateBondResultHandler(
- nsTArray>& aRunnableArray,
- BluetoothReplyRunnable* aRunnable)
- : mRunnableArray(aRunnableArray)
- , mRunnable(aRunnable)
- {
- MOZ_ASSERT(mRunnable);
- }
-
- void OnError(BluetoothStatus aStatus) override
- {
- mRunnableArray.RemoveElement(mRunnable);
- DispatchReplyError(mRunnable, aStatus);
- }
-
-private:
- nsTArray> mRunnableArray;
- nsRefPtr mRunnable;
-};
-
nsresult
BluetoothServiceBluedroid::CreatePairedDeviceInternal(
const nsAString& aDeviceAddress, int aTimeout,
@@ -918,37 +824,12 @@ BluetoothServiceBluedroid::CreatePairedDeviceInternal(
ENSURE_BLUETOOTH_IS_READY(aRunnable, NS_OK);
mCreateBondRunnables.AppendElement(aRunnable);
-
sBtInterface->CreateBond(aDeviceAddress, TRANSPORT_AUTO,
- new CreateBondResultHandler(mCreateBondRunnables, aRunnable));
+ new DispatchReplyErrorResultHandler(mCreateBondRunnables, aRunnable));
return NS_OK;
}
-class BluetoothServiceBluedroid::RemoveBondResultHandler final
- : public BluetoothResultHandler
-{
-public:
- RemoveBondResultHandler(
- nsTArray>& aRunnableArray,
- BluetoothReplyRunnable* aRunnable)
- : mRunnableArray(aRunnableArray)
- , mRunnable(aRunnable)
- {
- MOZ_ASSERT(mRunnable);
- }
-
- void OnError(BluetoothStatus aStatus) override
- {
- mRunnableArray.RemoveElement(mRunnable);
- DispatchReplyError(mRunnable, aStatus);
- }
-
-private:
- nsTArray> mRunnableArray;
- nsRefPtr mRunnable;
-};
-
nsresult
BluetoothServiceBluedroid::RemoveDeviceInternal(
const nsAString& aDeviceAddress, BluetoothReplyRunnable* aRunnable)
@@ -958,9 +839,8 @@ BluetoothServiceBluedroid::RemoveDeviceInternal(
ENSURE_BLUETOOTH_IS_READY(aRunnable, NS_OK);
mRemoveBondRunnables.AppendElement(aRunnable);
-
sBtInterface->RemoveBond(aDeviceAddress,
- new RemoveBondResultHandler(mRemoveBondRunnables, aRunnable));
+ new DispatchReplyErrorResultHandler(mRemoveBondRunnables, aRunnable));
return NS_OK;
}
@@ -970,7 +850,7 @@ class BluetoothServiceBluedroid::PinReplyResultHandler final
{
public:
PinReplyResultHandler(BluetoothReplyRunnable* aRunnable)
- : mRunnable(aRunnable)
+ : mRunnable(aRunnable)
{ }
void PinReply() override
@@ -1021,7 +901,7 @@ class BluetoothServiceBluedroid::SspReplyResultHandler final
{
public:
SspReplyResultHandler(BluetoothReplyRunnable* aRunnable)
- : mRunnable(aRunnable)
+ : mRunnable(aRunnable)
{ }
void SspReply() override
@@ -1759,9 +1639,8 @@ BluetoothServiceBluedroid::DiscoveryStateChangedNotification(bool aState)
}
void
-BluetoothServiceBluedroid::PinRequestNotification(const nsAString& aRemoteBdAddr,
- const nsAString& aBdName,
- uint32_t aCod)
+BluetoothServiceBluedroid::PinRequestNotification(
+ const nsAString& aRemoteBdAddr, const nsAString& aBdName, uint32_t aCod)
{
MOZ_ASSERT(NS_IsMainThread());
diff --git a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
index 8e51efc5069c..5892bfaa310a 100644
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
+++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
@@ -17,22 +17,17 @@ BEGIN_BLUETOOTH_NAMESPACE
class BluetoothServiceBluedroid : public BluetoothService
, public BluetoothNotificationHandler
{
- class CancelDiscoveryResultHandler;
class CleanupResultHandler;
- class CreateBondResultHandler;
class DisableResultHandler;
+ class DispatchReplyErrorResultHandler;
class EnableResultHandler;
class GetRemoteDevicePropertiesResultHandler;
- class GetRemoteServicesResultHandler;
class InitResultHandler;
class PinReplyResultHandler;
class ProfileDeinitResultHandler;
class ProfileInitResultHandler;
- class RemoveBondResultHandler;
class SetAdapterPropertyDiscoverableResultHandler;
- class SetAdapterPropertyResultHandler;
class SspReplyResultHandler;
- class StartDiscoveryResultHandler;
class GetDeviceRequest;
diff --git a/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp b/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
index b7e893fa2831..c940ae3f5341 100644
--- a/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
@@ -794,7 +794,8 @@ BluetoothAdapter::GetConnectedDevices(uint16_t aServiceUuid, ErrorResult& aRv)
}
void
-BluetoothAdapter::GetPairedDevices(nsTArray >& aDevices)
+BluetoothAdapter::GetPairedDevices(
+ nsTArray >& aDevices)
{
for (uint32_t i = 0; i < mDevices.Length(); ++i) {
if (mDevices[i]->Paired()) {
@@ -1332,7 +1333,8 @@ BluetoothAdapter::SendFile(const nsAString& aDeviceAddress,
}
already_AddRefed
-BluetoothAdapter::StopSendingFile(const nsAString& aDeviceAddress, ErrorResult& aRv)
+BluetoothAdapter::StopSendingFile(
+ const nsAString& aDeviceAddress, ErrorResult& aRv)
{
nsCOMPtr win = GetOwner();
if (!win) {
@@ -1532,7 +1534,8 @@ BluetoothAdapter::ToggleCalls(ErrorResult& aRv)
}
already_AddRefed
-BluetoothAdapter::SendMediaMetaData(const MediaMetaData& aMediaMetaData, ErrorResult& aRv)
+BluetoothAdapter::SendMediaMetaData(
+ const MediaMetaData& aMediaMetaData, ErrorResult& aRv)
{
nsCOMPtr win = GetOwner();
if (!win) {
@@ -1561,7 +1564,8 @@ BluetoothAdapter::SendMediaMetaData(const MediaMetaData& aMediaMetaData, ErrorRe
}
already_AddRefed
-BluetoothAdapter::SendMediaPlayStatus(const MediaPlayStatus& aMediaPlayStatus, ErrorResult& aRv)
+BluetoothAdapter::SendMediaPlayStatus(
+ const MediaPlayStatus& aMediaPlayStatus, ErrorResult& aRv)
{
nsCOMPtr win = GetOwner();
if (!win) {
diff --git a/dom/bluetooth/bluetooth2/BluetoothAdapter.h b/dom/bluetooth/bluetooth2/BluetoothAdapter.h
index 4ccdda2c3146..cb5db9ad1db7 100644
--- a/dom/bluetooth/bluetooth2/BluetoothAdapter.h
+++ b/dom/bluetooth/bluetooth2/BluetoothAdapter.h
@@ -314,6 +314,8 @@ private:
* Convert string to BluetoothAdapterAttribute.
*
* @param aString [in] String to convert
+ *
+ * @return the adapter attribute converted from |aString|
*/
BluetoothAdapterAttribute
ConvertStringToAdapterAttribute(const nsAString& aString);
@@ -323,14 +325,16 @@ private:
*
* @param aType [in] Adapter property to check
* @param aValue [in] New value of the adapter property
+ *
+ * @return true if the adapter property has changed; false otherwise
*/
bool IsAdapterAttributeChanged(BluetoothAdapterAttribute aType,
const BluetoothValue& aValue);
/**
- * Check whether this adapter is owned by Bluetooth certified app.
+ * Check whether this adapter belongs to Bluetooth certified app.
*
- * @return a boolean value to indicate whether it's owned by Bluetooth app.
+ * @return true if this adapter belongs to Bluetooth app; false otherwise
*/
bool IsBluetoothCertifiedApp();
diff --git a/dom/bluetooth/bluetooth2/BluetoothDevice.h b/dom/bluetooth/bluetooth2/BluetoothDevice.h
index fd304972dedd..914976923cac 100644
--- a/dom/bluetooth/bluetooth2/BluetoothDevice.h
+++ b/dom/bluetooth/bluetooth2/BluetoothDevice.h
@@ -126,6 +126,8 @@ private:
* Convert uint32_t to BluetoothDeviceType.
*
* @param aValue [in] uint32_t to convert
+ *
+ * @return the device type converted from |aValue|
*/
BluetoothDeviceType ConvertUint32ToDeviceType(const uint32_t aValue);
@@ -133,6 +135,8 @@ private:
* Convert string to BluetoothDeviceAttribute.
*
* @param aString [in] String to convert
+ *
+ * @return the device attribute converted from |aString|
*/
BluetoothDeviceAttribute
ConvertStringToDeviceAttribute(const nsAString& aString);
@@ -142,6 +146,8 @@ private:
*
* @param aType [in] Device property to check
* @param aValue [in] New value of the device property
+ *
+ * @return true is the device attribute has changed; false otherwise
*/
bool IsDeviceAttributeChanged(BluetoothDeviceAttribute aType,
const BluetoothValue& aValue);
@@ -152,7 +158,7 @@ private:
* Parse 'Advertising Data Type' from an inquiry response and set name, UUIDs
* and COD if they exist in ADV data.
*
- * @param aAdvData [in] advertising data which provided by the LeScan result.
+ * @param aAdvData [in] advertising data from LeScan result.
*/
void UpdatePropertiesFromAdvData(const nsTArray& aAdvData);
diff --git a/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp b/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp
index 9f0dc81bf9d2..46f91d392ce7 100644
--- a/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp
@@ -95,7 +95,7 @@ BluetoothDiscoveryHandle::DispatchLeDeviceEvent(BluetoothDevice* aLeDevice,
bool hasUuidsFilter = !mServiceUuids.IsEmpty();
bool noAdvertisingUuid = remoteUuids.IsEmpty();
- // If a LE device doesn't advertise its service UUIDs, it can't possibly pass
+ // If an LE device doesn't advertise its service UUIDs, it can't possibly pass
// the UUIDs filter.
if (hasUuidsFilter && noAdvertisingUuid) {
return;
@@ -104,7 +104,7 @@ BluetoothDiscoveryHandle::DispatchLeDeviceEvent(BluetoothDevice* aLeDevice,
// The web API startLeScan() makes the device's adapter start seeking for
// remote LE devices advertising given service UUIDs.
// Since current Bluetooth stack can't filter the results of LeScan by UUIDs,
- // gecko has to filter the results and dispach what API asked for.
+ // gecko has to filter the results and dispatch what API asked for.
bool matched = false;
for (size_t index = 0; index < remoteUuids.Length(); ++index) {
if (mServiceUuids.Contains(remoteUuids[index])) {
@@ -113,8 +113,8 @@ BluetoothDiscoveryHandle::DispatchLeDeviceEvent(BluetoothDevice* aLeDevice,
}
}
- // Dispach 'devicefound 'event only if
- // - the service UUIDs in the scan record matchs the given UUIDs.
+ // Dispatch 'devicefound' event only if
+ // - the service UUID in the scan record matches one of the given UUIDs.
// - the given UUIDs is empty.
if (matched || mServiceUuids.IsEmpty()) {
nsRefPtr event =
diff --git a/dom/bluetooth/bluetooth2/BluetoothGatt.cpp b/dom/bluetooth/bluetooth2/BluetoothGatt.cpp
index 9f15f8c845c7..ff86b8d578c0 100644
--- a/dom/bluetooth/bluetooth2/BluetoothGatt.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothGatt.cpp
@@ -302,7 +302,8 @@ BluetoothGatt::HandleCharacteristicsDiscovered(const BluetoothValue& aValue)
aValue.get_ArrayOfBluetoothNamedValue();
MOZ_ASSERT(values.Length() == 2); // ServiceId, Characteristics
MOZ_ASSERT(values[0].name().EqualsLiteral("serviceId"));
- MOZ_ASSERT(values[0].value().type() == BluetoothValue::TBluetoothGattServiceId);
+ MOZ_ASSERT(values[0].value().type() ==
+ BluetoothValue::TBluetoothGattServiceId);
MOZ_ASSERT(values[1].name().EqualsLiteral("characteristics"));
MOZ_ASSERT(values[1].value().type() ==
BluetoothValue::TArrayOfBluetoothGattCharAttribute);
@@ -325,11 +326,13 @@ BluetoothGatt::HandleDescriptorsDiscovered(const BluetoothValue& aValue)
aValue.get_ArrayOfBluetoothNamedValue();
MOZ_ASSERT(values.Length() == 3); // ServiceId, CharacteristicId, Descriptors
MOZ_ASSERT(values[0].name().EqualsLiteral("serviceId"));
- MOZ_ASSERT(values[0].value().type() == BluetoothValue::TBluetoothGattServiceId);
+ MOZ_ASSERT(values[0].value().type() ==
+ BluetoothValue::TBluetoothGattServiceId);
MOZ_ASSERT(values[1].name().EqualsLiteral("characteristicId"));
MOZ_ASSERT(values[1].value().type() == BluetoothValue::TBluetoothGattId);
MOZ_ASSERT(values[2].name().EqualsLiteral("descriptors"));
- MOZ_ASSERT(values[2].value().type() == BluetoothValue::TArrayOfBluetoothGattId);
+ MOZ_ASSERT(values[2].value().type() ==
+ BluetoothValue::TArrayOfBluetoothGattId);
size_t index = mServices.IndexOf(
values[0].value().get_BluetoothGattServiceId());
diff --git a/dom/bluetooth/bluetooth2/BluetoothGatt.h b/dom/bluetooth/bluetooth2/BluetoothGatt.h
index 0085df06e73c..ce6864aac269 100644
--- a/dom/bluetooth/bluetooth2/BluetoothGatt.h
+++ b/dom/bluetooth/bluetooth2/BluetoothGatt.h
@@ -142,7 +142,7 @@ private:
/**
* The value of a GATT characteristic has changed. In the mean time, the
- * cached value of this GATT characteristic has already been updated. An
+ * cached value of this GATT characteristic has already been updated. A
* 'characteristicchanged' event will be fired by this function.
*
* @param aValue [in] BluetoothValue which contains an array of
diff --git a/dom/bluetooth/bluetooth2/BluetoothGattCharacteristic.cpp b/dom/bluetooth/bluetooth2/BluetoothGattCharacteristic.cpp
index d9ff633bae62..bea2ab1274c1 100644
--- a/dom/bluetooth/bluetooth2/BluetoothGattCharacteristic.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothGattCharacteristic.cpp
@@ -188,12 +188,14 @@ BluetoothGattCharacteristic::GetProperties(
{
aProperties.mBroadcast = mProperties & GATT_CHAR_PROP_BIT_BROADCAST;
aProperties.mRead = mProperties & GATT_CHAR_PROP_BIT_READ;
- aProperties.mWriteNoResponse = mProperties & GATT_CHAR_PROP_BIT_WRITE_NO_RESPONSE;
+ aProperties.mWriteNoResponse =
+ mProperties & GATT_CHAR_PROP_BIT_WRITE_NO_RESPONSE;
aProperties.mWrite = mProperties & GATT_CHAR_PROP_BIT_WRITE;
aProperties.mNotify = mProperties & GATT_CHAR_PROP_BIT_NOTIFY;
aProperties.mIndicate = mProperties & GATT_CHAR_PROP_BIT_INDICATE;
aProperties.mSignedWrite = mProperties & GATT_CHAR_PROP_BIT_SIGNED_WRITE;
- aProperties.mExtendedProps = mProperties & GATT_CHAR_PROP_BIT_EXTENDED_PROPERTIES;
+ aProperties.mExtendedProps =
+ mProperties & GATT_CHAR_PROP_BIT_EXTENDED_PROPERTIES;
}
class ReadValueTask final : public BluetoothReplyRunnable
diff --git a/dom/bluetooth/bluetooth2/BluetoothLeDeviceEvent.cpp b/dom/bluetooth/bluetooth2/BluetoothLeDeviceEvent.cpp
index fe4d95f19286..0adf89268040 100644
--- a/dom/bluetooth/bluetooth2/BluetoothLeDeviceEvent.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothLeDeviceEvent.cpp
@@ -38,7 +38,8 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothLeDeviceEvent)
NS_INTERFACE_MAP_END_INHERITING(Event)
-BluetoothLeDeviceEvent::BluetoothLeDeviceEvent(mozilla::dom::EventTarget* aOwner)
+BluetoothLeDeviceEvent::BluetoothLeDeviceEvent(
+ mozilla::dom::EventTarget* aOwner)
: Event(aOwner, nullptr, nullptr)
{
mozilla::HoldJSObjects(this);
diff --git a/dom/bluetooth/bluetooth2/BluetoothService.cpp b/dom/bluetooth/bluetooth2/BluetoothService.cpp
index ea02ff4ab62f..5c860ad9b228 100644
--- a/dom/bluetooth/bluetooth2/BluetoothService.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothService.cpp
@@ -301,7 +301,8 @@ RemoveAllSignalHandlers(const nsAString& aKey,
nsAutoPtr& aData,
void* aUserArg)
{
- BluetoothSignalObserver* handler = static_cast(aUserArg);
+ BluetoothSignalObserver* handler =
+ static_cast(aUserArg);
aData->RemoveObserver(handler);
// We shouldn't have duplicate instances in the ObserverList, but there's
// no appropriate way to do duplication check while registering, so
@@ -320,13 +321,15 @@ BluetoothService::UnregisterAllSignalHandlers(BluetoothSignalObserver* aHandler)
}
void
-BluetoothService::DistributeSignal(const nsAString& aName, const nsAString& aPath)
+BluetoothService::DistributeSignal(const nsAString& aName,
+ const nsAString& aPath)
{
DistributeSignal(aName, aPath, BluetoothValue(true));
}
void
-BluetoothService::DistributeSignal(const nsAString& aName, const nsAString& aPath,
+BluetoothService::DistributeSignal(const nsAString& aName,
+ const nsAString& aPath,
const BluetoothValue& aValue)
{
BluetoothSignal signal(nsString(aName), nsString(aPath), aValue);
diff --git a/dom/bluetooth/bluez/BluetoothA2dpManager.cpp b/dom/bluetooth/bluez/BluetoothA2dpManager.cpp
index 098fe7918eb5..3e8f97af910e 100644
--- a/dom/bluetooth/bluez/BluetoothA2dpManager.cpp
+++ b/dom/bluetooth/bluez/BluetoothA2dpManager.cpp
@@ -184,14 +184,16 @@ BluetoothA2dpManager::Disconnect(BluetoothProfileController* aController)
BluetoothService* bs = BluetoothService::Get();
if (!bs) {
if (aController) {
- aController->NotifyCompletion(NS_LITERAL_STRING(ERR_NO_AVAILABLE_RESOURCE));
+ aController->NotifyCompletion(
+ NS_LITERAL_STRING(ERR_NO_AVAILABLE_RESOURCE));
}
return;
}
if (!mA2dpConnected) {
if (aController) {
- aController->NotifyCompletion(NS_LITERAL_STRING(ERR_ALREADY_DISCONNECTED));
+ aController->NotifyCompletion(
+ NS_LITERAL_STRING(ERR_ALREADY_DISCONNECTED));
}
return;
}
@@ -262,7 +264,8 @@ void
BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
{
MOZ_ASSERT(NS_IsMainThread());
- MOZ_ASSERT(aSignal.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue);
+ MOZ_ASSERT(aSignal.value().type() ==
+ BluetoothValue::TArrayOfBluetoothNamedValue);
const nsString& address = aSignal.path();
/**
diff --git a/dom/bluetooth/bluez/BluetoothDBusService.cpp b/dom/bluetooth/bluez/BluetoothDBusService.cpp
index 11ebc844c4aa..fcd0b236e58f 100644
--- a/dom/bluetooth/bluez/BluetoothDBusService.cpp
+++ b/dom/bluetooth/bluez/BluetoothDBusService.cpp
@@ -378,7 +378,8 @@ static StaticAutoPtr sStopBluetoothMonitor;
// Protects against bug 969447.
static StaticAutoPtr sGetPropertyMonitor;
-typedef void (*UnpackFunc)(DBusMessage*, DBusError*, BluetoothValue&, nsAString&);
+typedef void (*UnpackFunc)(DBusMessage*, DBusError*,
+ BluetoothValue&, nsAString&);
typedef bool (*FilterFunc)(const BluetoothValue&);
static void
@@ -400,9 +401,10 @@ DispatchToBtThread(nsIRunnable* aRunnable)
MOZ_ASSERT(NS_IsMainThread());
if (!sBluetoothThread) {
- sBluetoothThread = new LazyIdleThread(BT_LAZY_THREAD_TIMEOUT_MS,
- NS_LITERAL_CSTRING("BluetoothDBusService"),
- LazyIdleThread::ManualShutdown);
+ sBluetoothThread =
+ new LazyIdleThread(BT_LAZY_THREAD_TIMEOUT_MS,
+ NS_LITERAL_CSTRING("BluetoothDBusService"),
+ LazyIdleThread::ManualShutdown);
ClearOnShutdown(&sBluetoothThread);
}
return sBluetoothThread->Dispatch(aRunnable, NS_DISPATCH_NORMAL);
@@ -589,7 +591,8 @@ public:
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mSignal.name().EqualsLiteral("PropertyChanged"));
- MOZ_ASSERT(mSignal.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue);
+ MOZ_ASSERT(mSignal.value().type() ==
+ BluetoothValue::TArrayOfBluetoothNamedValue);
// Replace object path with device address
nsString address = GetAddressFromObjectPath(mSignal.path());
@@ -733,7 +736,7 @@ RunDBusCallback(DBusMessage* aMsg, void* aBluetoothReplyRunnable,
MOZ_ASSERT(!NS_IsMainThread()); // I/O thread
#endif
nsRefPtr replyRunnable =
- dont_AddRef(static_cast< BluetoothReplyRunnable* >(aBluetoothReplyRunnable));
+ dont_AddRef(static_cast(aBluetoothReplyRunnable));
MOZ_ASSERT(replyRunnable, "Callback reply runnable is null!");
@@ -1472,7 +1475,8 @@ AgentEventFilter(DBusConnection *conn, DBusMessage *msg, void *data)
// Do not send a notification to upper layer, too annoying.
return DBUS_HANDLER_RESULT_HANDLED;
- } else if (dbus_message_is_method_call(msg, DBUS_AGENT_IFACE, "RequestPairingConsent")) {
+ } else if (dbus_message_is_method_call(msg, DBUS_AGENT_IFACE,
+ "RequestPairingConsent")) {
// Directly SetPairingconfirmation for RequestPairingConsent here
if (!dbus_message_get_args(msg, nullptr,
DBUS_TYPE_OBJECT_PATH, &objectPath,
@@ -1481,7 +1485,8 @@ AgentEventFilter(DBusConnection *conn, DBusMessage *msg, void *data)
goto handle_error;
}
- nsString address = GetAddressFromObjectPath(NS_ConvertUTF8toUTF16(objectPath));
+ nsString address =
+ GetAddressFromObjectPath(NS_ConvertUTF8toUTF16(objectPath));
sPairingReqTable->Put(address, msg);
Task* task = new SetPairingConfirmationTask(address, true, nullptr);
DispatchToDBusThread(task);
@@ -2093,12 +2098,13 @@ public:
/* Normally we'll receive the signal 'AdapterAdded' with the adapter object
* path from the DBus daemon during start up. So, there's no need to query
* the object path of default adapter here. However, if we restart from a
- * crash, the default adapter might already be available, so we ask the daemon
- * explicitly here.
+ * crash, the default adapter might already be available, so we ask the
+ * daemon explicitly here.
*/
if (sAdapterPath.IsEmpty()) {
- bool success = sDBusConnection->SendWithReply(OnDefaultAdapterReply, nullptr,
- 1000, BLUEZ_DBUS_BASE_IFC, "/",
+ bool success = sDBusConnection->SendWithReply(OnDefaultAdapterReply,
+ nullptr, 1000,
+ BLUEZ_DBUS_BASE_IFC, "/",
DBUS_MANAGER_IFACE,
"DefaultAdapter",
DBUS_TYPE_INVALID);
@@ -2483,7 +2489,8 @@ OnSendDiscoveryMessageReply(DBusMessage *aReply, void *aData)
}
nsRefPtr runnable =
- dont_AddRef(static_cast(aData));
+ dont_AddRef(
+ static_cast(aData));
DispatchBluetoothReply(runnable.get(), BluetoothValue(true), errorStr);
}
@@ -2823,8 +2830,8 @@ private:
};
nsresult
-BluetoothDBusService::GetConnectedDevicePropertiesInternal(uint16_t aServiceUuid,
- BluetoothReplyRunnable* aRunnable)
+BluetoothDBusService::GetConnectedDevicePropertiesInternal(
+ uint16_t aServiceUuid, BluetoothReplyRunnable* aRunnable)
{
MOZ_ASSERT(NS_IsMainThread());
@@ -3534,9 +3541,9 @@ private:
class OnGetServiceChannelReplyHandler : public DBusReplyHandler
{
public:
- OnGetServiceChannelReplyHandler(const nsAString& aDeviceAddress,
- const nsAString& aServiceUUID,
- BluetoothProfileManagerBase* aBluetoothProfileManager)
+ OnGetServiceChannelReplyHandler(
+ const nsAString& aDeviceAddress, const nsAString& aServiceUUID,
+ BluetoothProfileManagerBase* aBluetoothProfileManager)
: mDeviceAddress(aDeviceAddress),
mServiceUUID(aServiceUUID),
mBluetoothProfileManager(aBluetoothProfileManager)
@@ -3559,10 +3566,9 @@ public:
channel = dbus_returns_int32(aReply);
}
- nsRefPtr r = new OnGetServiceChannelRunnable(mDeviceAddress,
- mServiceUUID,
- channel,
- mBluetoothProfileManager);
+ nsRefPtr r =
+ new OnGetServiceChannelRunnable(mDeviceAddress, mServiceUUID, channel,
+ mBluetoothProfileManager);
nsresult rv = NS_DispatchToMainThread(r);
NS_ENSURE_SUCCESS_VOID(rv);
}
@@ -3877,8 +3883,8 @@ public:
// We currently don't support genre field in music player.
// In order to send media metadata through AVRCP, we set genre to an empty
- // string to match the BlueZ method "UpdateMetaData" with signature "sssssss",
- // which takes genre field as the last parameter.
+ // string to match the BlueZ method "UpdateMetaData" with signature
+ // "sssssss", which takes genre field as the last parameter.
nsCString tempGenre = EmptyCString();
nsCString tempMediaNumber = EmptyCString();
nsCString tempTotalMediaCount = EmptyCString();
diff --git a/dom/bluetooth/bluez/BluetoothDBusService.h b/dom/bluetooth/bluez/BluetoothDBusService.h
index 414c4b8b6b40..e3275845d3a2 100644
--- a/dom/bluetooth/bluez/BluetoothDBusService.h
+++ b/dom/bluetooth/bluez/BluetoothDBusService.h
@@ -55,8 +55,8 @@ public:
GetAdaptersInternal(BluetoothReplyRunnable* aRunnable) override;
virtual nsresult
- GetConnectedDevicePropertiesInternal(uint16_t aServiceUuid,
- BluetoothReplyRunnable* aRunnable) override;
+ GetConnectedDevicePropertiesInternal(
+ uint16_t aServiceUuid, BluetoothReplyRunnable* aRunnable) override;
virtual nsresult
GetPairedDevicePropertiesInternal(const nsTArray& aDeviceAddresses,
@@ -66,9 +66,11 @@ public:
FetchUuidsInternal(const nsAString& aDeviceAddress,
BluetoothReplyRunnable* aRunnable) override;
- virtual void StartDiscoveryInternal(BluetoothReplyRunnable* aRunnable) override;
+ virtual void
+ StartDiscoveryInternal(BluetoothReplyRunnable* aRunnable) override;
- virtual void StopDiscoveryInternal(BluetoothReplyRunnable* aRunnable) override;
+ virtual void
+ StopDiscoveryInternal(BluetoothReplyRunnable* aRunnable) override;
virtual nsresult
SetProperty(BluetoothObjectType aType,
diff --git a/dom/bluetooth/bluez/BluetoothHfpManager.cpp b/dom/bluetooth/bluez/BluetoothHfpManager.cpp
index eb58686012e7..54f1a5eed46f 100644
--- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp
@@ -590,7 +590,8 @@ BluetoothHfpManager::HandleVolumeChanged(nsISupports* aSubject)
// {"key":"volumeup", "value":10}
// {"key":"volumedown", "value":2}
- RootedDictionary setting(nsContentUtils::RootingCx());
+ RootedDictionary
+ setting(nsContentUtils::RootingCx());
if (!WrappedJSToDictionary(aSubject, setting)) {
return;
@@ -843,7 +844,8 @@ BluetoothHfpManager::ReceiveSocketData(BluetoothSocket* aSocket,
if (!atCommandValues[0].EqualsLiteral("3") ||
!atCommandValues[1].EqualsLiteral("0")) {
if (mCMEE) {
- SendCommand(RESPONSE_CME_ERROR, BluetoothCmeError::OPERATION_NOT_SUPPORTED);
+ SendCommand(RESPONSE_CME_ERROR,
+ BluetoothCmeError::OPERATION_NOT_SUPPORTED);
} else {
SendLine("ERROR");
}
@@ -1225,7 +1227,8 @@ BluetoothHfpManager::Disconnect(BluetoothProfileController* aController)
if (!mSocket) {
if (aController) {
- aController->NotifyCompletion(NS_LITERAL_STRING(ERR_ALREADY_DISCONNECTED));
+ aController->NotifyCompletion(
+ NS_LITERAL_STRING(ERR_ALREADY_DISCONNECTED));
}
return;
}
@@ -1507,8 +1510,10 @@ BluetoothHfpManager::HandleCallStateChanged(uint32_t aCallIndex,
case nsITelephonyService::CALL_STATE_HELD:
switch (prevCallState) {
case nsITelephonyService::CALL_STATE_CONNECTED: {
- uint32_t numActive = GetNumberOfCalls(nsITelephonyService::CALL_STATE_CONNECTED);
- uint32_t numHeld = GetNumberOfCalls(nsITelephonyService::CALL_STATE_HELD);
+ uint32_t numActive =
+ GetNumberOfCalls(nsITelephonyService::CALL_STATE_CONNECTED);
+ uint32_t numHeld =
+ GetNumberOfCalls(nsITelephonyService::CALL_STATE_HELD);
uint32_t numConCalls = GetNumberOfConCalls();
/**
@@ -1530,20 +1535,24 @@ BluetoothHfpManager::HandleCallStateChanged(uint32_t aCallIndex,
if (!aIsConference) {
if (numActive + numHeld == 1) {
// A single active call is put on hold.
- sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
+ sCINDItems[CINDType::CALLHELD].value =
+ CallHeldState::ONHOLD_NOACTIVE;
} else {
// An active call is placed on hold or active/held calls swapped.
- sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
+ sCINDItems[CINDType::CALLHELD].value =
+ CallHeldState::ONHOLD_ACTIVE;
}
SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
} else if (GetNumberOfConCalls(nsITelephonyService::CALL_STATE_HELD)
== numConCalls) {
if (numActive + numHeld == numConCalls) {
// An active conference call is put on hold.
- sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
+ sCINDItems[CINDType::CALLHELD].value =
+ CallHeldState::ONHOLD_NOACTIVE;
} else {
// Active calls are placed on hold or active/held calls swapped.
- sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
+ sCINDItems[CINDType::CALLHELD].value =
+ CallHeldState::ONHOLD_ACTIVE;
}
SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
}