From 5ddc0d7a145e2c095cb900ff7f095c4576dd88c1 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Tsai Date: Tue, 23 Oct 2012 15:06:14 +0800 Subject: [PATCH] Bug 804073 - B2G RIL: use system message to notify telephony new calls. r=philikon --- dom/system/gonk/RadioInterfaceLayer.js | 14 ++++---------- dom/system/gonk/ril_worker.js | 7 +------ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index 153884ece320..644a704058ed 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -580,14 +580,6 @@ RadioInterfaceLayer.prototype = { case "setPreferredNetworkType": this.handleSetPreferredNetworkType(message); break; - case "stkcallsetup": - // A call has been placed by the STK app. We shall launch the dialer - // app by sending a system message, in order to further control the - // call, e.g. hang it up. - debug("STK app has placed a call no. " + message.command.options.address); - gSystemMessenger.broadcastMessage("icc-dialing", {state: "dialing", - number: message.command.options.address}); - break; case "queryCallForwardStatus": this.handleQueryCallForwardStatus(message); break; @@ -1104,8 +1096,10 @@ RadioInterfaceLayer.prototype = { debug("handleCallStateChange: " + JSON.stringify(call)); call.state = convertRILCallState(call.state); - if (call.state == nsIRadioInterfaceLayer.CALL_STATE_INCOMING) { - gSystemMessenger.broadcastMessage("telephony-incoming", {number: call.number}); + if (call.state == nsIRadioInterfaceLayer.CALL_STATE_INCOMING || + call.state == nsIRadioInterfaceLayer.CALL_STATE_DIALING) { + gSystemMessenger.broadcastMessage("telephony-new-call", {number: call.number, + state: call.state}); } if (call.isActive) { diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index 0f68699768e6..8bdfa6dae47c 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -4833,12 +4833,7 @@ RIL[REQUEST_STK_GET_PROFILE] = null; RIL[REQUEST_STK_SET_PROFILE] = null; RIL[REQUEST_STK_SEND_ENVELOPE_COMMAND] = null; RIL[REQUEST_STK_SEND_TERMINAL_RESPONSE] = null; -RIL[REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM] = function REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM(length, options) { - if (!options.rilRequestError && options.hasConfirmed) { - options.rilMessageType = "stkcallsetup"; - this.sendDOMMessage(options); - } -}; +RIL[REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM] = null; RIL[REQUEST_EXPLICIT_CALL_TRANSFER] = null; RIL[REQUEST_SET_PREFERRED_NETWORK_TYPE] = function REQUEST_SET_PREFERRED_NETWORK_TYPE(length, options) { if (options.networkType == null) {