Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 807071fe authored by Shuo Qian's avatar Shuo Qian Committed by Gerrit Code Review
Browse files

Merge "Keep old country ISO for country-related emergency number if signal is lost"

parents 92130732 d29a4236
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -122,6 +122,14 @@ public class EmergencyNumberTracker extends Handler {
                            TelephonyManager.EXTRA_NETWORK_COUNTRY);
                    logd("ACTION_NETWORK_COUNTRY_CHANGED: PhoneId: " + phoneId + " CountryIso: "
                            + countryIso);
                    // Sometimes the country is updated as an empty string when the network signal
                    // is lost; though we may not call emergency when there is no signal, we want
                    // to keep the old country iso to provide country-related emergency numbers,
                    // because they think they are still in that country. So we do need to update
                    // country change in this case.
                    if (TextUtils.isEmpty(countryIso)) {
                        return;
                    }
                    updateEmergencyNumberDatabaseCountryChange(countryIso);
                }
                return;