Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: I3ae0e489ccccb59869cfb9a5737790d8c079cbab
Change-Id: I0219de06937adc4fbdd883403612badb398ea309
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index cf20002..7f97608 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -218,6 +218,7 @@
from the background. -->
<uses-permission android:name="android.permission.START_ACTIVITIES_FROM_BACKGROUND" />
<uses-permission android:name="android.permission.NETWORK_STATS_PROVIDER" />
+ <uses-permission android:name="android.permission.HANDLE_CAR_MODE_CHANGES"/>
<application android:name="PhoneApp"
android:persistent="true"
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index 9f6c24f..46c245a 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -854,7 +854,8 @@
// Next check whether we're in or near a country that supports it
String country =
mPhone.getServiceStateTracker().getLocaleTracker()
- .getCurrentCountry().toLowerCase();
+ .getLastKnownCountryIso().toLowerCase();
+
String[] supportedCountries = mContext.getResources().getStringArray(
R.array.config_simless_emergency_rtt_supported_countries);
if (supportedCountries == null || Arrays.stream(supportedCountries).noneMatch(
@@ -863,7 +864,7 @@
+ " not supported in this country: " + country);
return false;
}
-
+
return true;
}