Bug 766273 - B2G telephony on Otoro: Can't hang up dialing call. r=philikon

This commit is contained in:
Hsinyi Tsai 2012-06-20 18:52:51 +08:00
Родитель 5d9333f4b7
Коммит b9e76d4e3f
1 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -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;
}
},