mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge b2g-inbound to mozilla-central a=merge
This commit is contained in:
commit
ed5b6f739a
@ -1268,6 +1268,28 @@ private:
|
||||
BluetoothReplyRunnable* mRunnable;
|
||||
};
|
||||
|
||||
class BluetoothServiceBluedroid::CancelBondResultHandler final
|
||||
: public BluetoothCoreResultHandler
|
||||
{
|
||||
public:
|
||||
CancelBondResultHandler(BluetoothReplyRunnable* aRunnable)
|
||||
: mRunnable(aRunnable)
|
||||
{ }
|
||||
|
||||
void CancelBond() override
|
||||
{
|
||||
DispatchReplySuccess(mRunnable);
|
||||
}
|
||||
|
||||
void OnError(BluetoothStatus aStatus) override
|
||||
{
|
||||
DispatchReplyError(mRunnable, aStatus);
|
||||
}
|
||||
|
||||
private:
|
||||
BluetoothReplyRunnable* mRunnable;
|
||||
};
|
||||
|
||||
void
|
||||
BluetoothServiceBluedroid::PinReplyInternal(
|
||||
const BluetoothAddress& aDeviceAddress, bool aAccept,
|
||||
@ -1277,8 +1299,14 @@ BluetoothServiceBluedroid::PinReplyInternal(
|
||||
|
||||
ENSURE_BLUETOOTH_IS_ENABLED_VOID(aRunnable);
|
||||
|
||||
sBtCoreInterface->PinReply(aDeviceAddress, aAccept, aPinCode,
|
||||
new PinReplyResultHandler(aRunnable));
|
||||
if (aAccept) {
|
||||
sBtCoreInterface->PinReply(aDeviceAddress, aAccept, aPinCode,
|
||||
new PinReplyResultHandler(aRunnable));
|
||||
} else {
|
||||
// Call CancelBond to trigger BondStateChangedNotification
|
||||
sBtCoreInterface->CancelBond(aDeviceAddress,
|
||||
new CancelBondResultHandler(aRunnable));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -20,6 +20,7 @@ class BluetoothServiceBluedroid
|
||||
, public BluetoothCoreNotificationHandler
|
||||
, public BluetoothNotificationHandler
|
||||
{
|
||||
class CancelBondResultHandler;
|
||||
class CleanupResultHandler;
|
||||
class DisableResultHandler;
|
||||
class DispatchReplyErrorResultHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user