зеркало из https://github.com/mozilla/gecko-dev.git
Bug 766273 - B2G telephony on Otoro: Can't hang up dialing call. r=philikon
This commit is contained in:
Родитель
5d9333f4b7
Коммит
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;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче