mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 820103 - Patch 1: bluetooth Hfp memory dialing and Hfp supplied number not supported, r=echou
This commit is contained in:
parent
455951f78c
commit
f880e8281e
@ -393,13 +393,14 @@ BluetoothHfpManager::NotifySettings()
|
||||
void
|
||||
BluetoothHfpManager::NotifyDialer(const nsAString& aCommand)
|
||||
{
|
||||
nsString type, name, command;
|
||||
command = aCommand;
|
||||
nsString type, name;
|
||||
BluetoothValue v;
|
||||
InfallibleTArray<BluetoothNamedValue> parameters;
|
||||
type.AssignLiteral("bluetooth-dialer-command");
|
||||
|
||||
BluetoothValue v(command);
|
||||
parameters.AppendElement(BluetoothNamedValue(type, v));
|
||||
name.AssignLiteral("command");
|
||||
v = nsString(aCommand);
|
||||
parameters.AppendElement(BluetoothNamedValue(name, v));
|
||||
|
||||
if (!BroadcastSystemMessage(type, parameters)) {
|
||||
NS_WARNING("Failed to broadcast system message to dialer");
|
||||
@ -601,6 +602,21 @@ BluetoothHfpManager::ReceiveSocketData(UnixSocketRawData* aMessage)
|
||||
} else if (!strncmp(msg, "AT+CHUP", 7)) {
|
||||
NotifyDialer(NS_LITERAL_STRING("CHUP"));
|
||||
SendLine("OK");
|
||||
} else if (!strncmp(msg, "ATD>", 4)) {
|
||||
// Currently, we don't support memory dialing in Dialer app
|
||||
SendLine("ERROR");
|
||||
} else if (!strncmp(msg, "ATD", 3)) {
|
||||
nsAutoCString message(msg), newMsg;
|
||||
int end = message.FindChar(';');
|
||||
if (end < 0) {
|
||||
NS_WARNING("Could't get the value of command [ATD]");
|
||||
SendLine("OK");
|
||||
return;
|
||||
}
|
||||
|
||||
newMsg += nsDependentCSubstring(message, 0, end);
|
||||
NotifyDialer(NS_ConvertUTF8toUTF16(newMsg));
|
||||
SendLine("OK");
|
||||
} else if (!strncmp(msg, "AT+CKPD", 7)) {
|
||||
// For Headset
|
||||
switch (currentCallState) {
|
||||
|
Loading…
Reference in New Issue
Block a user