mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879680 - (mmi-result-cf) [MMI] Use MMIResult for Call Forwarding related functionality. r=ferjm
This commit is contained in:
parent
0c699898c9
commit
3160742a8e
@ -1576,6 +1576,14 @@ RILContentHelper.prototype = {
|
|||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MMI query call forwarding options request returns a set of rules that
|
||||||
|
// will be exposed in the form of an array of nsIDOMMozMobileCFInfo
|
||||||
|
// instances.
|
||||||
|
if (message.mmiServiceCode === RIL.MMI_KS_SC_CALL_FORWARDING &&
|
||||||
|
message.additionalInformation) {
|
||||||
|
this._cfRulesToMobileCfInfo(message.additionalInformation);
|
||||||
|
}
|
||||||
|
|
||||||
let result = {
|
let result = {
|
||||||
serviceCode: message.mmiServiceCode,
|
serviceCode: message.mmiServiceCode,
|
||||||
additionalInformation: message.additionalInformation
|
additionalInformation: message.additionalInformation
|
||||||
|
@ -2566,6 +2566,11 @@ this.MMI_SM_KS_PIN_CHANGED = "smPinChanged";
|
|||||||
this.MMI_SM_KS_PIN2_CHANGED = "smPin2Changed";
|
this.MMI_SM_KS_PIN2_CHANGED = "smPin2Changed";
|
||||||
this.MMI_SM_KS_PIN_UNBLOCKED = "smPinUnblocked";
|
this.MMI_SM_KS_PIN_UNBLOCKED = "smPinUnblocked";
|
||||||
this.MMI_SM_KS_PIN2_UNBLOCKED = "smPin2Unblocked";
|
this.MMI_SM_KS_PIN2_UNBLOCKED = "smPin2Unblocked";
|
||||||
|
this.MMI_SM_KS_SERVICE_ENABLED = "smServiceEnabled";
|
||||||
|
this.MMI_SM_KS_SERVICE_DISABLED = "smServiceDisabled";
|
||||||
|
this.MMI_SM_KS_SERVICE_REGISTERED = "smServiceRegistered";
|
||||||
|
this.MMI_SM_KS_SERVICE_ERASED = "smServiceErased";
|
||||||
|
this.MMI_SM_KS_SERVICE_INTERROGATED = "smServiceInterrogated";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CDMA PDU constants
|
* CDMA PDU constants
|
||||||
|
@ -4850,8 +4850,7 @@ RIL[REQUEST_QUERY_CALL_FORWARD_STATUS] =
|
|||||||
}
|
}
|
||||||
if (!rulesLength) {
|
if (!rulesLength) {
|
||||||
options.success = false;
|
options.success = false;
|
||||||
options.errorMsg =
|
options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
|
||||||
"Invalid rule length while querying call forwarding status.";
|
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4867,6 +4866,13 @@ RIL[REQUEST_QUERY_CALL_FORWARD_STATUS] =
|
|||||||
rules[i] = rule;
|
rules[i] = rule;
|
||||||
}
|
}
|
||||||
options.rules = rules;
|
options.rules = rules;
|
||||||
|
if (options.rilMessageType === "sendMMI") {
|
||||||
|
options.statusMessage = MMI_SM_KS_SERVICE_INTERROGATED;
|
||||||
|
// MMI query call forwarding options request returns a set of rules that
|
||||||
|
// will be exposed in the form of an array of nsIDOMMozMobileCFInfo
|
||||||
|
// instances.
|
||||||
|
options.additionalInformation = rules;
|
||||||
|
}
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
};
|
};
|
||||||
RIL[REQUEST_SET_CALL_FORWARD] =
|
RIL[REQUEST_SET_CALL_FORWARD] =
|
||||||
@ -4875,6 +4881,22 @@ RIL[REQUEST_SET_CALL_FORWARD] =
|
|||||||
if (!options.success) {
|
if (!options.success) {
|
||||||
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||||
}
|
}
|
||||||
|
if (options.success && options.isSendMMI) {
|
||||||
|
switch (options.action) {
|
||||||
|
case CALL_FORWARD_ACTION_ENABLE:
|
||||||
|
options.statusMessage = MMI_SM_KS_SERVICE_ENABLED;
|
||||||
|
break;
|
||||||
|
case CALL_FORWARD_ACTION_DISABLE:
|
||||||
|
options.statusMessage = MMI_SM_KS_SERVICE_DISABLED;
|
||||||
|
break;
|
||||||
|
case CALL_FORWARD_ACTION_REGISTRATION:
|
||||||
|
options.statusMessage = MMI_SM_KS_SERVICE_REGISTERED;
|
||||||
|
break;
|
||||||
|
case CALL_FORWARD_ACTION_ERASURE:
|
||||||
|
options.statusMessage = MMI_SM_KS_SERVICE_ERASED;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
};
|
};
|
||||||
RIL[REQUEST_QUERY_CALL_WAITING] =
|
RIL[REQUEST_QUERY_CALL_WAITING] =
|
||||||
|
Loading…
Reference in New Issue
Block a user