Place audio routing ops back onto handler thread
Revert the performance improvement flag work to move operations onto the
main thread and move them back to the handler thread. The main culprit
was Telecom calling audio fwk APIs to get the preferred device which was
holding up the main thread up to 1s. This caused issues with delays in
BT ICS getting updates about an ongoing call for instance and Telecom
attempting to connect SCO before that as a result. Transitioning to
using audio fwk provided listeners should prevent Telecom's synchronous
calls on the audio fwk APIs and be able to rely on cached values
provided by the callbacks instead.
Bug: 407915389
Bug: 417822884
Flag: EXEMPT flag logic removal + minor bug fix
Test: atest CallAudioRouteControllerTest
Test: Manual log verification to check performance of new code logic
(minimal hold up now that we're using cached values)
Change-Id: Ie2df93397c0b80c5003c187e6e6a33dc5fe7e613
3 files changed