mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 766273 - B2G telephony on Otoro: Can't hang up dialing call. r=philikon
This commit is contained in:
parent
5d9333f4b7
commit
b9e76d4e3f
@ -1530,8 +1530,22 @@ let RIL = {
|
||||
*/
|
||||
hangUp: function hangUp(options) {
|
||||
let call = this.currentCalls[options.callIndex];
|
||||
if (call && call.state != CALL_STATE_HOLDING) {
|
||||
Buf.simpleRequest(REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND);
|
||||
if (!call) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (call.state) {
|
||||
case CALL_STATE_ACTIVE:
|
||||
case CALL_STATE_DIALING:
|
||||
case CALL_STATE_ALERTING:
|
||||
Buf.newParcel(REQUEST_HANGUP);
|
||||
Buf.writeUint32(1);
|
||||
Buf.writeUint32(options.callIndex);
|
||||
Buf.sendParcel();
|
||||
break;
|
||||
case CALL_STATE_HOLDING:
|
||||
Buf.simpleRequest(REQUEST_HANGUP_WAITING_OR_BACKGROUND);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user