зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1166180 - [cleanup] Remove function |EnsureBluetoothHalLoad| in BluetoothServiceBluedroid, r=shuang
This commit is contained in:
Родитель
7d03cbd030
Коммит
2248c8f63a
|
@ -134,15 +134,6 @@ BluetoothServiceBluedroid::PlayStatusStringToControlPlayStatus(
|
||||||
/**
|
/**
|
||||||
* Static functions
|
* Static functions
|
||||||
*/
|
*/
|
||||||
bool
|
|
||||||
BluetoothServiceBluedroid::EnsureBluetoothHalLoad()
|
|
||||||
{
|
|
||||||
sBtInterface = BluetoothInterface::GetInstance();
|
|
||||||
NS_ENSURE_TRUE(sBtInterface, false);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
class BluetoothServiceBluedroid::EnableResultHandler final
|
class BluetoothServiceBluedroid::EnableResultHandler final
|
||||||
: public BluetoothResultHandler
|
: public BluetoothResultHandler
|
||||||
{
|
{
|
||||||
|
@ -293,9 +284,9 @@ BluetoothServiceBluedroid::StopGonkBluetooth()
|
||||||
*/
|
*/
|
||||||
BluetoothServiceBluedroid::BluetoothServiceBluedroid()
|
BluetoothServiceBluedroid::BluetoothServiceBluedroid()
|
||||||
{
|
{
|
||||||
if (!EnsureBluetoothHalLoad()) {
|
sBtInterface = BluetoothInterface::GetInstance();
|
||||||
BT_LOGR("Error! Failed to load bluedroid library.");
|
if (!sBtInterface) {
|
||||||
return;
|
BT_LOGR("Error! Failed to get instance of bluetooth interface");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,15 +730,6 @@ BluetoothServiceBluedroid::PlayStatusStringToControlPlayStatus(
|
||||||
/**
|
/**
|
||||||
* Static functions
|
* Static functions
|
||||||
*/
|
*/
|
||||||
bool
|
|
||||||
BluetoothServiceBluedroid::EnsureBluetoothHalLoad()
|
|
||||||
{
|
|
||||||
sBtInterface = BluetoothInterface::GetInstance();
|
|
||||||
NS_ENSURE_TRUE(sBtInterface, false);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
class BluetoothServiceBluedroid::EnableResultHandler final
|
class BluetoothServiceBluedroid::EnableResultHandler final
|
||||||
: public BluetoothResultHandler
|
: public BluetoothResultHandler
|
||||||
{
|
{
|
||||||
|
@ -926,9 +908,9 @@ ReplyStatusError(BluetoothReplyRunnable* aBluetoothReplyRunnable,
|
||||||
*/
|
*/
|
||||||
BluetoothServiceBluedroid::BluetoothServiceBluedroid()
|
BluetoothServiceBluedroid::BluetoothServiceBluedroid()
|
||||||
{
|
{
|
||||||
if (!EnsureBluetoothHalLoad()) {
|
sBtInterface = BluetoothInterface::GetInstance();
|
||||||
BT_LOGR("Error! Failed to load bluedroid library.");
|
if (!sBtInterface) {
|
||||||
return;
|
BT_LOGR("Error! Failed to get instance of bluetooth interface");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -312,7 +312,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
static nsresult StartGonkBluetooth();
|
static nsresult StartGonkBluetooth();
|
||||||
static nsresult StopGonkBluetooth();
|
static nsresult StopGonkBluetooth();
|
||||||
static bool EnsureBluetoothHalLoad();
|
|
||||||
|
|
||||||
static void ConnectDisconnect(bool aConnect,
|
static void ConnectDisconnect(bool aConnect,
|
||||||
const nsAString& aDeviceAddress,
|
const nsAString& aDeviceAddress,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче