handle 2 calls from the same app case in VoipCallMonitor
It was pointed out that AM was throwing an exception when a second
voip call was added to telecom for the same app. Upon investigation,
foreground service delegation should only be granted once for an app
instead of on a per call basis.
Changes:
- FGS is started ONLY if the application does not have it already
instead of every time the call is added
- FGS is revoked if the notification is removed and the call is
not disconnected after 5 seconds
- only support call-style notifications posted AFTER the call is
added
- The logging around FGS events has changed. Prev logged when
start/stop requests are sent to AM. Now, fgs gain/revoked is
logged when AM calls the service.
Flag: com.android.server.telecom.flags.voip_call_monitor_refactor
Bug: 381129034
Test: manual
Change-Id: Ic5f02575b1efc72d5e848907bd1006ca4cdf2edb
diff --git a/flags/Android.bp b/flags/Android.bp
index 54b1443..6f9caae 100644
--- a/flags/Android.bp
+++ b/flags/Android.bp
@@ -46,5 +46,6 @@
"telecom_headless_system_user_mode.aconfig",
"telecom_session_flags.aconfig",
"telecom_metrics_flags.aconfig",
+ "telecom_voip_flags.aconfig",
],
}
diff --git a/flags/telecom_voip_flags.aconfig b/flags/telecom_voip_flags.aconfig
new file mode 100644
index 0000000..67635e9
--- /dev/null
+++ b/flags/telecom_voip_flags.aconfig
@@ -0,0 +1,13 @@
+package: "com.android.server.telecom.flags"
+container: "system"
+
+# OWNER=tjstuart TARGET=25Q2
+flag {
+ name: "voip_call_monitor_refactor"
+ namespace: "telecom"
+ description: "VoipCallMonitor reworked to handle multi calling scenarios for the same app"
+ bug: "381129034"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
\ No newline at end of file