Return shared Emergency Country Iso for Multi-sim country iso
In multi-sim, some vendor may only notify the emergency network
info only through one of the IRadio slots, so that the emergency country
info of the other IRadio slots are missing and the emergency number list
from the database cannot be cached based on the country. To solve this,
we need the share the emergency network country to other slots if those
slots are not registrated with the emergency network.
Test: Treehugger; Manual
Bug: 137236159
Bug: 137235431
Change-Id: I356191fe09e8c58445260f3f45d0fac0e1eff67c
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 7a20d8b..073606f 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1967,10 +1967,15 @@
Phone phone = PhoneFactory.getPhone(phoneId);
if (phone != null) {
ServiceStateTracker sst = phone.getServiceStateTracker();
+ EmergencyNumberTracker emergencyNumberTracker = phone.getEmergencyNumberTracker();
if (sst != null) {
LocaleTracker lt = sst.getLocaleTracker();
if (lt != null) {
- return lt.getCurrentCountry();
+ if (!TextUtils.isEmpty(lt.getCurrentCountry())) {
+ return lt.getCurrentCountry();
+ } else if (emergencyNumberTracker != null) {
+ return emergencyNumberTracker.getEmergencyCountryIso();
+ }
}
}
}