Support notifying Telecom when a call is ended due to new emergency call
When there is a new outgoing emergency call, the telephony
ConnectionService may choose to end existing calls based on
carrier configurations. This change introduces a new DisconnectCause
reason, which allws Telecom to pop up a notification when calls
in this fasion.
Also restricts the possible PhoneAccounts that can have simultaneous
non-emergency+emergency calls to those with the
CAPABILITY_PLACE_EMERGENCY_CALLS capability to make sure 3rd party
PhoneAccounts do not perform badly and affect the outgoing emergency
call.
Bug: 138741228
Test: atest TelecomUnitTests; atest CtsTelecomTestCases
Change-Id: I1e1836367080e8235ebb4818a49f2aa26ad1d7a0
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2c6a84a..93c5782 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -48,6 +48,14 @@
[CHAR LIMIT=18] -->
<string name="notification_missedCall_message">Message</string>
+ <!-- Disconnected call notification label, used when the call has been automatically
+ disconnected by telecom to make room for a higher priority call, such as an emergency
+ call.-->
+ <string name="notification_disconnectedCall_title">Disconnected call</string>
+ <!-- Body of the notification presented when an ongoing call is disconnected in favor of placing
+ an emergency call. This is required by some carriers. [CHAR LIMIT=NONE] -->
+ <string name="notification_disconnectedCall_body">The call to <xliff:g id="caller">%s</xliff:g> has been disconnected due to an emergency call being placed.</string>
+
<!-- Title for the persistent notification presented when an app has requested that a call
be put into the background so that the app can access the audio from the call
[CHAR LIMIT=40] -->
@@ -290,6 +298,8 @@
<string name="notification_channel_call_blocking">Call Blocking</string>
<!-- Notification channel name for a channel containing background call notifications. -->
<string name="notification_channel_background_calls">Background calls</string>
+ <!-- Notification channel name for a channel containing disconnected call notifications. -->
+ <string name="notification_channel_disconnected_calls">Disconnected calls</string>
<!-- Alert dialog content used to inform the user that placing a new outgoing call will end the
ongoing call in the app "other_app". -->