mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 804851 - Add telephony mock object to avoid Contacts app errors on B2G Desktop. r=gwagner
--HG-- extra : rebase_source : 9329364aac86696b3d6f526831b85235167aa8f8
This commit is contained in:
parent
60788c9e2a
commit
5a658cc058
@ -22,9 +22,18 @@ XPCOMUtils.defineLazyServiceGetter(this, "ppmm",
|
||||
"nsIMessageListenerManager");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "mRIL", function () {
|
||||
return Cc["@mozilla.org/telephony/system-worker-manager;1"].
|
||||
getService(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIRadioInterfaceLayer);
|
||||
let telephony = Cc["@mozilla.org/telephony/system-worker-manager;1"];
|
||||
if (!telephony) {
|
||||
// Return a mock RIL because B2G Desktop build does not support telephony.
|
||||
return {
|
||||
getICCContacts: function(aContactType, aCallback) {
|
||||
aCallback("!telephony", null, null);
|
||||
}
|
||||
};
|
||||
}
|
||||
return telephony.
|
||||
getService(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIRadioInterfaceLayer);
|
||||
});
|
||||
|
||||
let myGlobal = this;
|
||||
|
Loading…
Reference in New Issue
Block a user