mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 713451 - B2G RIL: Handle request errors. r=philikon
This commit is contained in:
parent
e883e42a7a
commit
954357edc9
@ -178,6 +178,23 @@ const UNSOLICITED_OEM_HOOK_RAW = 1028;
|
||||
const UNSOLICITED_RINGBACK_TONE = 1029;
|
||||
const UNSOLICITED_RESEND_INCALL_MUTE = 1030;
|
||||
|
||||
const ERROR_SUCCESS = 0;
|
||||
const ERROR_RADIO_NOT_AVAILABLE = 1;
|
||||
const ERROR_GENERIC_FAILURE = 2;
|
||||
const ERROR_PASSWORD_INCORRECT = 3;
|
||||
const ERROR_SIM_PIN2 = 4;
|
||||
const ERROR_SIM_PUK2 = 5;
|
||||
const ERROR_REQUEST_NOT_SUPPORTED = 6;
|
||||
const ERROR_CANCELLED = 7;
|
||||
const ERROR_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8;
|
||||
const ERROR_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9;
|
||||
const ERROR_SMS_SEND_FAIL_RETRY = 10;
|
||||
const ERROR_SIM_ABSENT = 11;
|
||||
const ERROR_SUBSCRIPTION_NOT_AVAILABLE = 12;
|
||||
const ERROR_MODE_NOT_SUPPORTED = 13;
|
||||
const ERROR_FDN_CHECK_FAILURE = 14;
|
||||
const ERROR_ILLEGAL_SIM_OR_ME = 15;
|
||||
|
||||
const RADIO_STATE_OFF = 0;
|
||||
const RADIO_STATE_UNAVAILABLE = 1;
|
||||
const RADIO_STATE_SIM_NOT_READY = 2;
|
||||
|
@ -463,12 +463,14 @@ let Buf = {
|
||||
|
||||
options = this.tokenRequestMap[token];
|
||||
request_type = options.rilRequestType;
|
||||
if (error) {
|
||||
//TODO
|
||||
|
||||
options.rilRequestError = error;
|
||||
if (error) {
|
||||
if (DEBUG) {
|
||||
debug("Received error " + error + " for solicited parcel type " +
|
||||
request_type);
|
||||
}
|
||||
RIL.handleRequestError(options);
|
||||
return;
|
||||
}
|
||||
if (DEBUG) {
|
||||
@ -509,6 +511,7 @@ let Buf = {
|
||||
options = {};
|
||||
}
|
||||
options.rilRequestType = type;
|
||||
options.rilRequestError = null;
|
||||
this.tokenRequestMap[token] = options;
|
||||
this.token++;
|
||||
return token;
|
||||
@ -939,6 +942,14 @@ let RIL = {
|
||||
getFailCauseCode: function getFailCauseCode() {
|
||||
Buf.simpleRequest(REQUEST_LAST_CALL_FAIL_CAUSE);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle the RIL request errors
|
||||
*/
|
||||
handleRequestError: function handleRequestError(options) {
|
||||
options.type = "error";
|
||||
Phone.sendDOMMessage(options);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle incoming requests from the RIL. We find the method that
|
||||
|
Loading…
Reference in New Issue
Block a user