Bug 804073 - B2G RIL: use system message to notify telephony new calls. r=philikon

This commit is contained in:
Hsin-Yi Tsai 2012-10-23 15:06:14 +08:00
Родитель 6a01fbc842
Коммит 5ddc0d7a14
2 изменённых файлов: 5 добавлений и 16 удалений

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

@ -580,14 +580,6 @@ RadioInterfaceLayer.prototype = {
case "setPreferredNetworkType": case "setPreferredNetworkType":
this.handleSetPreferredNetworkType(message); this.handleSetPreferredNetworkType(message);
break; 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": case "queryCallForwardStatus":
this.handleQueryCallForwardStatus(message); this.handleQueryCallForwardStatus(message);
break; break;
@ -1104,8 +1096,10 @@ RadioInterfaceLayer.prototype = {
debug("handleCallStateChange: " + JSON.stringify(call)); debug("handleCallStateChange: " + JSON.stringify(call));
call.state = convertRILCallState(call.state); call.state = convertRILCallState(call.state);
if (call.state == nsIRadioInterfaceLayer.CALL_STATE_INCOMING) { if (call.state == nsIRadioInterfaceLayer.CALL_STATE_INCOMING ||
gSystemMessenger.broadcastMessage("telephony-incoming", {number: call.number}); call.state == nsIRadioInterfaceLayer.CALL_STATE_DIALING) {
gSystemMessenger.broadcastMessage("telephony-new-call", {number: call.number,
state: call.state});
} }
if (call.isActive) { if (call.isActive) {

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

@ -4833,12 +4833,7 @@ RIL[REQUEST_STK_GET_PROFILE] = null;
RIL[REQUEST_STK_SET_PROFILE] = null; RIL[REQUEST_STK_SET_PROFILE] = null;
RIL[REQUEST_STK_SEND_ENVELOPE_COMMAND] = null; RIL[REQUEST_STK_SEND_ENVELOPE_COMMAND] = null;
RIL[REQUEST_STK_SEND_TERMINAL_RESPONSE] = 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) { RIL[REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM] = null;
if (!options.rilRequestError && options.hasConfirmed) {
options.rilMessageType = "stkcallsetup";
this.sendDOMMessage(options);
}
};
RIL[REQUEST_EXPLICIT_CALL_TRANSFER] = null; RIL[REQUEST_EXPLICIT_CALL_TRANSFER] = null;
RIL[REQUEST_SET_PREFERRED_NETWORK_TYPE] = function REQUEST_SET_PREFERRED_NETWORK_TYPE(length, options) { RIL[REQUEST_SET_PREFERRED_NETWORK_TYPE] = function REQUEST_SET_PREFERRED_NETWORK_TYPE(length, options) {
if (options.networkType == null) { if (options.networkType == null) {