Merge "Speculative fix for flaky CallAudioRouteStateMachine tests"
diff --git a/tests/src/com/android/server/telecom/tests/CallAudioRouteStateMachineTest.java b/tests/src/com/android/server/telecom/tests/CallAudioRouteStateMachineTest.java
index 14fdf05..95d6d51 100644
--- a/tests/src/com/android/server/telecom/tests/CallAudioRouteStateMachineTest.java
+++ b/tests/src/com/android/server/telecom/tests/CallAudioRouteStateMachineTest.java
@@ -20,6 +20,7 @@
import android.content.Context;
import android.media.AudioManager;
import android.media.IAudioService;
+import android.os.Handler;
import android.telecom.CallAudioState;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
@@ -988,6 +989,8 @@
verify(mMockInterruptionFilterProxy, never()).setInterruptionFilter(anyInt());
}
+ Handler h = stateMachine.getHandler();
+ waitForHandlerAction(h, TEST_TIMEOUT);
stateMachine.quitStateMachine();
// Verify interactions with the speakerphone and bluetooth systems