mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 787477 - Part 3: Add errorMsg for getICCContacts in RIL. r=philikon
This commit is contained in:
parent
dbcf4d5560
commit
54092eec59
@ -448,7 +448,9 @@ RadioInterfaceLayer.prototype = {
|
||||
let callback = this._contactsCallbacks[message.requestId];
|
||||
if (callback) {
|
||||
delete this._contactsCallbacks[message.requestId];
|
||||
callback.receiveContactsList(message.contactType, message.contacts);
|
||||
callback.receiveContactsList(message.errorMsg,
|
||||
message.contactType,
|
||||
message.contacts);
|
||||
}
|
||||
break;
|
||||
case "iccmbdn":
|
||||
@ -1864,7 +1866,7 @@ RadioInterfaceLayer.prototype = {
|
||||
getICCContacts: function getICCContacts(contactType, callback) {
|
||||
if (!this._contactsCallbacks) {
|
||||
this._contactsCallbacks = {};
|
||||
}
|
||||
}
|
||||
let requestId = Math.floor(Math.random() * 1000);
|
||||
this._contactsCallbacks[requestId] = callback;
|
||||
this.worker.postMessage({rilMessageType: "getICCContacts",
|
||||
|
@ -1461,11 +1461,10 @@ let RIL = {
|
||||
}
|
||||
|
||||
function error(options) {
|
||||
// TODO: Error handling should be addressed in Bug 787477
|
||||
delete options.callback;
|
||||
delete options.onerror;
|
||||
options.rilMessageType = "icccontacts";
|
||||
options.contacts = [];
|
||||
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||
this.sendDOMMessage(options);
|
||||
}
|
||||
|
||||
@ -1554,9 +1553,8 @@ let RIL = {
|
||||
*/
|
||||
getICCContacts: function getICCContacts(options) {
|
||||
if (!this.appType) {
|
||||
// TODO: Error handling should be addressed in Bug 787477
|
||||
options.rilMessageType = "icccontacts";
|
||||
options.contacts = [];
|
||||
options.errorMsg = GECKO_ERROR_REQUEST_NOT_SUPPORTED;
|
||||
this.sendDOMMessage(options);
|
||||
}
|
||||
|
||||
@ -1602,11 +1600,10 @@ let RIL = {
|
||||
}
|
||||
|
||||
function error(options) {
|
||||
// TODO: Error handling should be addressed in Bug 787477
|
||||
delete options.callback;
|
||||
delete options.onerror;
|
||||
options.rilMessageType = "icccontacts";
|
||||
options.contacts = [];
|
||||
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||
this.sendDOMMessage(options);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user