Add DynamicRoutingController
Add a DynamicRoutingController that makes emergency calls through normal routing if normal calls are possible, and through emergency routing if not.
Add information to the resource about whether to use the dynamic routing feature, countries that use the dynamic routing feature, and emergency numbers that should be dialed through normal routing if possible.
Always use emergency routing if the source of the emergency number is Network or SIM.
Bug: 336759603
Test: atest TeleServiceTests
Test: build and manual test
Change-Id: I3660ff626085ea75365ac0bf51bcc39e943c1358
diff --git a/res/values/config.xml b/res/values/config.xml
index 575e766..cdef37e 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -366,6 +366,23 @@
<item>cn</item>
</string-array>
+ <!-- Dynamic routing of emergency calls: trying normal routing if it's available.
+ Otherwise, emergency routing. -->
+ <!-- TODO (b/346398725: temporary code, cleanup) -->
+ <bool name="dynamic_routing_emergency_enabled">false</bool>
+
+ <!-- Array of countries that the dynamic routing is supported.
+ Values should be ISO3166 country codes in lowercase. -->
+ <string-array name="config_countries_dynamic_routing_emergency_enabled"
+ translatable="false">
+ </string-array>
+
+ <!-- Array of emergency numbers for dynamic routing.
+ Values are the tuples of Country ISO, MNC, and numbers. -->
+ <string-array name="config_dynamic_routing_emergency_numbers"
+ translatable="false">
+ </string-array>
+
<!-- The component name(a flattened ComponentName string) for the telephony domain selection
service. The device should fallback to the modem based domain selection architecture
if this is not configured. -->