Add CallAnomalyWatchdog to Telecom.
We define a transitory call state and intermediate call state.
- A call stuck in NEW, CONNECTING, DISCONNECTING, or ANSWERED state
for > 5 seconds;
these states are considered “transitory” states and the underlying
connection service that services the call should update the state
almost immediately.
- A call stuck in DIALING or RINGING state for > 60 seconds;
if a call is stuck in a DIALING or RINGING state for longer it is
likely never going to connect.
These states are “intermediate” states which we expect a call to be
in for a longer term than the transitory states.
We have seen cases where calls get stuck in these states; it is the job
of this watchdog to monitor for these types of situations and to
automatically disconnect a call which is stuck in such a state.
This takes place of the mitigation made in b/180154311 to force a call
stuck in CONNECTING state to be disconnected in preference of a new call.
The watchdog will clear these calls after a timeout.
One Pager link : go/telecom-anomaly-detection
Bug: 234468655
Test: Manual - modify test app to behave poorly; verify that the transient
call states get cleared up.
Test: Auto - added unit test coverage for watchdog.
Change-Id: Id94223a8815d5b1e99d19b49a9124accc333e572
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index d9756fa..c84db3b 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -23,6 +23,7 @@
android:minSdkVersion="23"
android:targetSdkVersion="33" />
+ <uses-permission android:name="android.permission.READ_DEVICE_CONFIG"/>
<!-- TODO: Needed because we call BluetoothAdapter.getDefaultAdapter() statically, and
BluetoothAdapter is a final class. -->
<uses-permission android:name="android.permission.BLUETOOTH" />