Fix unit tests
Unit tests were failing because:
1. The fake context's bindServiceAsUser asynchronously calls
onServiceConnected, but the InCallController assumes that its connect()
method would finish before onServiceConnected gets called.
2. Video call tests depended on counting the number of audio state
transitions. This number is not a guaranteed (or even consistent) value,
so the mechanism for determining the final audio state has been replaced
by a latch posted to the CARSM handler.
3. IncomingCallFilter tests were experiencing a strange problem where
setting the timeouts value only worked when the tests were run in
isolation. This was fixed by putting in an adapter for the static
Timeouts class.
Fix: 28200736
Change-Id: If5fbd60e1a3c5d478d4555d8794a49855997f1d3
9 files changed