mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 825851 - Patch 1: Handle AT command: AT+VGM, r=echou
This commit is contained in:
parent
893bbc6417
commit
f171760c2a
@ -616,6 +616,23 @@ BluetoothHfpManager::ReceiveSocketData(UnixSocketRawData* aMessage)
|
||||
* SLC establishment is done when AT+CMER has been received.
|
||||
* Do nothing but respond with "OK".
|
||||
*/
|
||||
} else if (msg.Find("AT+VGM=") != -1) {
|
||||
ParseAtCommand(msg, 7, atCommandValues);
|
||||
|
||||
if (atCommandValues.IsEmpty()) {
|
||||
NS_WARNING("Couldn't get the value of command [AT+VGM]");
|
||||
goto respond_with_ok;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
int vgm = atCommandValues[0].ToInteger(&rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to extract microphone volume from bluetooth headset!");
|
||||
goto respond_with_ok;
|
||||
}
|
||||
|
||||
NS_ASSERTION(vgm >= 0 && vgm <= 15, "Received invalid VGM value");
|
||||
mCurrentVgm = vgm;
|
||||
} else if (msg.Find("AT+CHLD=?") != -1) {
|
||||
SendLine("+CHLD: (1,2)");
|
||||
} else if (msg.Find("AT+CHLD=") != -1) {
|
||||
|
@ -56,6 +56,7 @@ private:
|
||||
virtual void OnDisconnect() MOZ_OVERRIDE;
|
||||
|
||||
int mCurrentVgs;
|
||||
int mCurrentVgm;
|
||||
int mCurrentCallIndex;
|
||||
bool mCLIP;
|
||||
bool mReceiveVgsFlag;
|
||||
|
Loading…
Reference in New Issue
Block a user