зеркало из https://github.com/mozilla/gecko-dev.git
Bug 843452 - Part 4-8: [MobileIdentityManager] Get {voice|data}Info via MobileConnectionService. r=ferjmoreno
This commit is contained in:
Родитель
94212cd1a3
Коммит
14f1104ef5
|
@ -59,6 +59,10 @@ XPCOMUtils.defineLazyServiceGetter(this, "gRil",
|
|||
XPCOMUtils.defineLazyServiceGetter(this, "iccProvider",
|
||||
"@mozilla.org/ril/content-helper;1",
|
||||
"nsIIccProvider");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "mobileConnectionService",
|
||||
"@mozilla.org/mobileconnection/mobileconnectionservice;1",
|
||||
"nsIMobileConnectionService");
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -123,15 +127,17 @@ this.MobileIdentityManager = {
|
|||
continue;
|
||||
}
|
||||
|
||||
let voice = mobileConnectionService.getVoiceConnectionInfo(i);
|
||||
let data = mobileConnectionService.getDataConnectionInfo(i);
|
||||
let operator = null;
|
||||
if (rilContext.voice.network &&
|
||||
rilContext.voice.network.shortName &&
|
||||
rilContext.voice.network.shortName.length) {
|
||||
operator = rilContext.voice.network.shortName;
|
||||
} else if (rilContext.data.network &&
|
||||
rilContext.data.network.shortName &&
|
||||
rilContext.data.network.shortName.length) {
|
||||
operator = rilContext.data.network.shortName;
|
||||
if (voice.network &&
|
||||
voice.network.shortName &&
|
||||
voice.network.shortName.length) {
|
||||
operator = voice.network.shortName;
|
||||
} else if (data.network &&
|
||||
data.network.shortName &&
|
||||
data.network.shortName.length) {
|
||||
operator = data.network.shortName;
|
||||
}
|
||||
|
||||
this._iccInfo.push({
|
||||
|
@ -142,7 +148,7 @@ this.MobileIdentityManager = {
|
|||
msisdn: info.msisdn || info.mdn || null,
|
||||
operator: operator,
|
||||
serviceId: i,
|
||||
roaming: rilContext.voice.roaming
|
||||
roaming: voice.roaming
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче