Adds tests for MSIM redial and fixes bug
1) Adds MSIM redial tests.
2) Fixes bug where we were not removing
a phone after making it when initializing
the cache.
Test: Unit tests
Bug: 27059146
Change-Id: Ia6ecc82ddd93ba7ad33ea01a8f5678f02cc09df1
diff --git a/tests/src/com/android/TelephonyTestBase.java b/tests/src/com/android/TelephonyTestBase.java
index 044f26b..a61ffe9 100644
--- a/tests/src/com/android/TelephonyTestBase.java
+++ b/tests/src/com/android/TelephonyTestBase.java
@@ -39,6 +39,14 @@
// Set up the looper if it does not exist on the test thread.
if (Looper.myLooper() == null) {
Looper.prepare();
+ // Wait until the looper is not null anymore
+ for(int i = 0; i < 5; i++) {
+ if (Looper.myLooper() != null) {
+ break;
+ }
+ Looper.prepare();
+ Thread.sleep(100);
+ }
}
}