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":
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) {

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

@ -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) {