зеркало из https://github.com/mozilla/gecko-dev.git
Bug 926343 - Part 6: Use default clientId in PhoneNumberUtils. r=gwagner
This commit is contained in:
Родитель
4006fc7377
Коммит
dfa3c412c3
|
@ -43,15 +43,22 @@ this.PhoneNumberUtils = {
|
|||
let countryName;
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
// Get network mcc
|
||||
// TODO: Bug 926740 - PhoneNumberUtils for multisim
|
||||
let voice = mobileConnection.getVoiceConnectionInfo(0);
|
||||
// In Multi-sim, there is more than one client in
|
||||
// iccProvider/mobileConnectionProvider. Each client represents a
|
||||
// icc/mobileConnection service. To maintain the backward compatibility with
|
||||
// single sim, we always use client 0 for now. Adding support for multiple
|
||||
// sim will be addressed in bug 926740, if needed.
|
||||
let clientId = 0;
|
||||
|
||||
// Get network mcc
|
||||
let voice = mobileConnection.getVoiceConnectionInfo(clientId);
|
||||
if (voice && voice.network && voice.network.mcc) {
|
||||
mcc = voice.network.mcc;
|
||||
}
|
||||
|
||||
// Get SIM mcc
|
||||
let iccInfo = icc.iccInfo;
|
||||
let iccInfo = icc.getIccInfo(clientId);
|
||||
if (!mcc && iccInfo && iccInfo.mcc) {
|
||||
mcc = iccInfo.mcc;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче