mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 787477 - Part 2: Update ContactManager and ContactService. r=gwagner
This commit is contained in:
parent
2b13c5c193
commit
f4225c4693
@ -413,6 +413,7 @@ ContactManager.prototype = {
|
||||
case "Contact:Save:Return:KO":
|
||||
case "Contact:Remove:Return:KO":
|
||||
case "Contacts:Clear:Return:KO":
|
||||
case "Contacts:GetSimContacts:Return:KO":
|
||||
req = this.getRequest(msg.requestID);
|
||||
if (req)
|
||||
Services.DOMRequest.fireError(req.request, msg.errorMsg);
|
||||
@ -579,6 +580,7 @@ ContactManager.prototype = {
|
||||
"Contact:Save:Return:OK", "Contact:Save:Return:KO",
|
||||
"Contact:Remove:Return:OK", "Contact:Remove:Return:KO",
|
||||
"Contacts:GetSimContacts:Return:OK",
|
||||
"Contacts:GetSimContacts:Return:KO",
|
||||
"PermissionPromptHelper:AskPermission:OK"]);
|
||||
},
|
||||
|
||||
|
@ -149,11 +149,19 @@ let DOMContactManager = {
|
||||
);
|
||||
break;
|
||||
case "Contacts:GetSimContacts":
|
||||
let callback = function(aContactType, aContacts) {
|
||||
if (DEBUG) debug("got SIM contacts: " + aContactType + " " + JSON.stringify(aContacts));
|
||||
mm.sendAsyncMessage("Contacts:GetSimContacts:Return:OK", {requestID: msg.requestID, contacts: aContacts});
|
||||
};
|
||||
mRIL.getICCContacts(msg.options.contactType, callback);
|
||||
mRIL.getICCContacts(
|
||||
msg.options.contactType,
|
||||
function (aErrorMsg, aType, aContacts) {
|
||||
if (aErrorMsg) {
|
||||
mm.sendAsyncMessage("Contacts:GetSimContacts:Return:KO",
|
||||
{requestID: msg.requestID,
|
||||
errorMsg: aErrorMsg});
|
||||
} else {
|
||||
mm.sendAsyncMessage("Contacts:GetSimContacts:Return:OK",
|
||||
{requestID: msg.requestID,
|
||||
contacts: aContacts});
|
||||
}
|
||||
}.bind(this));
|
||||
break;
|
||||
default:
|
||||
if (DEBUG) debug("WRONG MESSAGE NAME: " + aMessage.name);
|
||||
|
Loading…
Reference in New Issue
Block a user