Cache callbacks that can be ready before the service is set
After digging through some failed flaky call audio tests, I saw that the
CallEndpointController was not calling the callbacks because the
TransactionalServiceWrapper was null at the time the callbacks were
ready to be called. This is a timing issue that is hard to replicate.
To mitigate, the ServiceWrappers should cache the callbacks and once the
service is set, the callbacks should be sent.
Fixes: 321369729
Test: atest com.android.server.telecom.tests.CallTest
Change-Id: I923b5ddc9e3f801113c56f8b710b597f6d2efd0b
diff --git a/flags/telecom_call_flags.aconfig b/flags/telecom_call_flags.aconfig
index 5cb9dbd..40aa8b2 100644
--- a/flags/telecom_call_flags.aconfig
+++ b/flags/telecom_call_flags.aconfig
@@ -7,4 +7,11 @@
namespace: "telecom"
description: "verify connection service callbacks via a transaction"
bug: "309541257"
+}
+
+flag {
+ name: "cache_call_audio_callbacks"
+ namespace: "telecom"
+ description: "cache call audio callbacks if the service is not available and execute when set"
+ bug: "321369729"
}
\ No newline at end of file