mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1064264: Fix constants in Bluedroid HFP manager (under bluetooth2/), r=btian
This patch replaces the remaining Bluedroid constants from Bluedroid's |BluetoothHfpManager| with Gecko constants.
This commit is contained in:
parent
a9ed320628
commit
845e61f99e
@ -198,9 +198,9 @@ BluetoothHfpManager::Reset()
|
||||
mReceiveVgsFlag = false;
|
||||
mDialingRequestProcessed = true;
|
||||
|
||||
mConnectionState = BTHF_CONNECTION_STATE_DISCONNECTED;
|
||||
mPrevConnectionState = BTHF_CONNECTION_STATE_DISCONNECTED;
|
||||
mAudioState = BTHF_AUDIO_STATE_DISCONNECTED;
|
||||
mConnectionState = HFP_CONNECTION_STATE_DISCONNECTED;
|
||||
mPrevConnectionState = HFP_CONNECTION_STATE_DISCONNECTED;
|
||||
mAudioState = HFP_AUDIO_STATE_DISCONNECTED;
|
||||
|
||||
// Phone & Device CIND
|
||||
ResetCallArray();
|
||||
@ -525,9 +525,9 @@ BluetoothHfpManager::NotifyConnectionStateChanged(const nsAString& aType)
|
||||
mListener->EnumerateCalls();
|
||||
|
||||
OnConnect(EmptyString());
|
||||
} else if (mConnectionState == BTHF_CONNECTION_STATE_DISCONNECTED) {
|
||||
} else if (mConnectionState == HFP_CONNECTION_STATE_DISCONNECTED) {
|
||||
mDeviceAddress.AssignLiteral(BLUETOOTH_ADDRESS_NONE);
|
||||
if (mPrevConnectionState == BTHF_CONNECTION_STATE_DISCONNECTED) {
|
||||
if (mPrevConnectionState == HFP_CONNECTION_STATE_DISCONNECTED) {
|
||||
// Bug 979160: This implies the outgoing connection failure.
|
||||
// When the outgoing hfp connection fails, state changes to disconnected
|
||||
// state. Since bluedroid would not report connecting state, but only
|
||||
@ -1118,13 +1118,13 @@ BluetoothHfpManager::DisconnectSco()
|
||||
bool
|
||||
BluetoothHfpManager::IsScoConnected()
|
||||
{
|
||||
return (mAudioState == BTHF_AUDIO_STATE_CONNECTED);
|
||||
return (mAudioState == HFP_AUDIO_STATE_CONNECTED);
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothHfpManager::IsConnected()
|
||||
{
|
||||
return (mConnectionState == BTHF_CONNECTION_STATE_SLC_CONNECTED);
|
||||
return (mConnectionState == HFP_CONNECTION_STATE_SLC_CONNECTED);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1437,13 +1437,18 @@ void BluetoothHfpManager::DialCallNotification(const nsAString& aNumber)
|
||||
void
|
||||
BluetoothHfpManager::CnumNotification()
|
||||
{
|
||||
static const uint8_t sAddressType[] {
|
||||
[HFP_CALL_ADDRESS_TYPE_UNKNOWN] = 0x81,
|
||||
[HFP_CALL_ADDRESS_TYPE_INTERNATIONAL] = 0x91 // for completeness
|
||||
};
|
||||
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!mMsisdn.IsEmpty()) {
|
||||
nsAutoCString message("+CNUM: ,\"");
|
||||
message.Append(NS_ConvertUTF16toUTF8(mMsisdn).get());
|
||||
message.AppendLiteral("\",");
|
||||
message.AppendInt(BTHF_CALL_ADDRTYPE_UNKNOWN);
|
||||
message.AppendInt(sAddressType[HFP_CALL_ADDRESS_TYPE_UNKNOWN]);
|
||||
message.AppendLiteral(",,4");
|
||||
|
||||
SendLine(message.get());
|
||||
|
@ -168,9 +168,9 @@ private:
|
||||
void SendLine(const char* aMessage);
|
||||
void SendResponse(BluetoothHandsfreeAtResponse aResponseCode);
|
||||
|
||||
int mConnectionState;
|
||||
int mPrevConnectionState;
|
||||
int mAudioState;
|
||||
BluetoothHandsfreeConnectionState mConnectionState;
|
||||
BluetoothHandsfreeConnectionState mPrevConnectionState;
|
||||
BluetoothHandsfreeAudioState mAudioState;
|
||||
// Device CIND
|
||||
int mBattChg;
|
||||
BluetoothHandsfreeNetworkState mService;
|
||||
|
Loading…
Reference in New Issue
Block a user