Fix flaky test: OutgoingCallTest#testExtraPhoneAccountHandleAvailable
Wait for connection service unbinding before set up another connection
service to make sure the new connection service won't unbind
unexpectedly.
Bug: 160550032
Test: atest CtsTelecomTestCases:OutgoingCallTest
Change-Id: I185762936825c727d8d02dd6b730becca9e170db
(cherry picked from commit 330d17cabce5b79222577289299794bbed6f5da0)
diff --git a/tests/tests/telecom/src/android/telecom/cts/OutgoingCallTest.java b/tests/tests/telecom/src/android/telecom/cts/OutgoingCallTest.java
index 3dad1e5..494b2c8 100644
--- a/tests/tests/telecom/src/android/telecom/cts/OutgoingCallTest.java
+++ b/tests/tests/telecom/src/android/telecom/cts/OutgoingCallTest.java
@@ -185,6 +185,7 @@
assertEquals(TestUtils.TEST_PHONE_ACCOUNT_HANDLE, conn.getPhoneAccountHandle());
cleanupCalls();
+ assertCtsConnectionServiceUnbound();
CtsConnectionService.tearDown();
setupConnectionService(null, FLAG_REGISTER | FLAG_ENABLE);