mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 926343 - Part 6: Use default clientId in PhoneNumberUtils. r=gwagner
This commit is contained in:
parent
49c41c0bbd
commit
c79d5a7143
@ -43,15 +43,22 @@ this.PhoneNumberUtils = {
|
|||||||
let countryName;
|
let countryName;
|
||||||
|
|
||||||
#ifdef MOZ_B2G_RIL
|
#ifdef MOZ_B2G_RIL
|
||||||
// Get network mcc
|
|
||||||
// TODO: Bug 926740 - PhoneNumberUtils for multisim
|
// 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) {
|
if (voice && voice.network && voice.network.mcc) {
|
||||||
mcc = voice.network.mcc;
|
mcc = voice.network.mcc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get SIM mcc
|
// Get SIM mcc
|
||||||
let iccInfo = icc.iccInfo;
|
let iccInfo = icc.getIccInfo(clientId);
|
||||||
if (!mcc && iccInfo && iccInfo.mcc) {
|
if (!mcc && iccInfo && iccInfo.mcc) {
|
||||||
mcc = iccInfo.mcc;
|
mcc = iccInfo.mcc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user