fix VoipCallTransaction MessageQueue log spam
Background Context. There has been a few instances of Bug Reports
referencing a MessageQueue IllegalStateException in the
VoipCallTransaction class as the reason for the bug. Every time,
the issue turned out to be something else but the log spam wasted
resources and time following a false lead.
Issue. The ExceptionallyAsync block was using the same Executor that the
thenApplyAsync was using. The thenApplyAsync block always quits the
Handler and the ExceptionallyAsync task appears to post a message on the
dead Handler. Also, if an exception is encountered, the
TransactionManager should be notified right away instead of waiting for
a timeout.
Fix.
- use .exceptionally instead of .exceptionallyAsync
- notify other transactions and the transaction manager immmediately if
the future hits an exception.
Flag: NONE <fixes log spam. should make V>
Fixes: 317070482
Test: atest com.android.server.telecom.tests.VoipCallTransactionTest
&& looking through the logs when running a transactional test
to verify log spam is gone.
Change-Id: I8d7b8dac20dce5b4cfffd65a7998271fc6e15ee7
2 files changed