Fix NullPointerException in CallAudioRouteStateMachineTest

In order to fix b/268442423, we move the speaker on/off operation to
another thread to run it asynchronously. However, this will cause some
mock instance interactions after we tear down the test and we get
NullPointerException when mock instance get invoked in the separated
thread. Wait for the invocation before we end the test and tear it down
to fix this.

Bug: b/301082049
Test: atest CallAudioRouteStateMachineTest
Change-Id: Ia01271cc6da56a5f9af611b7a9d05869e63fa974
1 file changed