Bug 921402 - Part 3: [OperatorApps] Use nsIIccProvider to get iccInfo. r=fabrice

This commit is contained in:
Edgar Chen 2013-09-27 17:52:25 +08:00
parent b8ea836cc5
commit 0b4832d630

View File

@ -22,10 +22,6 @@ Cu.import("resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "iccProvider",
"@mozilla.org/ril/content-helper;1",
"nsIIccProvider");
XPCOMUtils.defineLazyServiceGetter(this, "mobileConnection",
"@mozilla.org/ril/content-helper;1",
"nsIMobileConnectionProvider");
#endif
function debug(aMsg) {
@ -90,11 +86,11 @@ this.OperatorAppsRegistry = {
debug("First Run with SIM");
let mcc = 0;
let mnc = 0;
if (mobileConnection.iccInfo && mobileConnection.iccInfo.mcc) {
mcc = mobileConnection.iccInfo.mcc;
if (iccProvider.iccInfo && iccProvider.iccInfo.mcc) {
mcc = iccProvider.iccInfo.mcc;
}
if (mobileConnection.iccInfo && mobileConnection.iccInfo.mnc) {
mnc = mobileConnection.iccInfo.mnc;
if (iccProvider.iccInfo && iccProvider.iccInfo.mnc) {
mnc = iccProvider.iccInfo.mnc;
}
if (mcc && mnc) {
this._installOperatorApps(mcc, mnc);