mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 1045461: Fix HFP fallback code to work with latest Bluetooth changes (under bluetooth2/), r=btian
Recent patches to Bluetooth introduced asynchronous initialization of profile manager. The code in hfp-fallback was not adapted then. This patch updates the broken code.
This commit is contained in:
parent
8936fb4f3b
commit
11e265c36c
@ -148,7 +148,7 @@ BluetoothHfpManager::Init()
|
||||
|
||||
// static
|
||||
void
|
||||
BluetoothHfpManager::InitHfpInterface()
|
||||
BluetoothHfpManager::InitHfpInterface(BluetoothProfileResultHandler* aRes)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
@ -157,11 +157,15 @@ BluetoothHfpManager::InitHfpInterface()
|
||||
* Implement InitHfpInterface() for applications that want to create SCO
|
||||
* link without a HFP connection (e.g., VoIP).
|
||||
*/
|
||||
|
||||
if (aRes) {
|
||||
aRes->Init();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void
|
||||
BluetoothHfpManager::DeinitHfpInterface()
|
||||
BluetoothHfpManager::DeinitHfpInterface(BluetoothProfileResultHandler* aRes)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
@ -170,6 +174,10 @@ BluetoothHfpManager::DeinitHfpInterface()
|
||||
* Implement DeinitHfpInterface() for applications that want to create SCO
|
||||
* link without a HFP connection (e.g., VoIP).
|
||||
*/
|
||||
|
||||
if (aRes) {
|
||||
aRes->Deinit();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -30,8 +30,8 @@ public:
|
||||
|
||||
static BluetoothHfpManager* Get();
|
||||
virtual ~BluetoothHfpManager() { }
|
||||
static void InitHfpInterface();
|
||||
static void DeinitHfpInterface();
|
||||
static void InitHfpInterface(BluetoothProfileResultHandler* aRes);
|
||||
static void DeinitHfpInterface(BluetoothProfileResultHandler* aRes);
|
||||
|
||||
bool ConnectSco();
|
||||
bool DisconnectSco();
|
||||
|
Loading…
Reference in New Issue
Block a user