Bug 1166180 - [cleanup] Remove function |EnsureBluetoothHalLoad| in BluetoothServiceBluedroid, r=shuang

This commit is contained in:
Ben Tian 2015-05-19 17:02:01 +08:00
Родитель 7d03cbd030
Коммит 2248c8f63a
2 изменённых файлов: 6 добавлений и 25 удалений

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

@ -134,15 +134,6 @@ BluetoothServiceBluedroid::PlayStatusStringToControlPlayStatus(
/**
* Static functions
*/
bool
BluetoothServiceBluedroid::EnsureBluetoothHalLoad()
{
sBtInterface = BluetoothInterface::GetInstance();
NS_ENSURE_TRUE(sBtInterface, false);
return true;
}
class BluetoothServiceBluedroid::EnableResultHandler final
: public BluetoothResultHandler
{
@ -293,9 +284,9 @@ BluetoothServiceBluedroid::StopGonkBluetooth()
*/
BluetoothServiceBluedroid::BluetoothServiceBluedroid()
{
if (!EnsureBluetoothHalLoad()) {
BT_LOGR("Error! Failed to load bluedroid library.");
return;
sBtInterface = BluetoothInterface::GetInstance();
if (!sBtInterface) {
BT_LOGR("Error! Failed to get instance of bluetooth interface");
}
}
@ -739,15 +730,6 @@ BluetoothServiceBluedroid::PlayStatusStringToControlPlayStatus(
/**
* Static functions
*/
bool
BluetoothServiceBluedroid::EnsureBluetoothHalLoad()
{
sBtInterface = BluetoothInterface::GetInstance();
NS_ENSURE_TRUE(sBtInterface, false);
return true;
}
class BluetoothServiceBluedroid::EnableResultHandler final
: public BluetoothResultHandler
{
@ -926,9 +908,9 @@ ReplyStatusError(BluetoothReplyRunnable* aBluetoothReplyRunnable,
*/
BluetoothServiceBluedroid::BluetoothServiceBluedroid()
{
if (!EnsureBluetoothHalLoad()) {
BT_LOGR("Error! Failed to load bluedroid library.");
return;
sBtInterface = BluetoothInterface::GetInstance();
if (!sBtInterface) {
BT_LOGR("Error! Failed to get instance of bluetooth interface");
}
}

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

@ -312,7 +312,6 @@ public:
protected:
static nsresult StartGonkBluetooth();
static nsresult StopGonkBluetooth();
static bool EnsureBluetoothHalLoad();
static void ConnectDisconnect(bool aConnect,
const nsAString& aDeviceAddress,