Wait longer for Telephony FW and RIL init before test execution
On some devices, the tests fail intermittently due to timing of
Telephony FW and RIL initiatization before executing the tests.
Added some delay before test execution mitigtes this issue.
Bug: 295440528
Change-Id: I13ae63a6eb476da64579f11a80142be2dca23db9
Signed-off-by: Rohit <r.kothari@samsung.corp-partner.google.com>
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTestOnMockModem.java b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTestOnMockModem.java
index 236b2f50..459eb06 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTestOnMockModem.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTestOnMockModem.java
@@ -147,6 +147,12 @@
sCallStateChangeCallbackHandler =
new Handler(sCallStateChangeCallbackHandlerThread.getLooper());
mShaId = getShaId(TelephonyUtils.CTS_APP_PACKAGE);
+
+ final PackageManager pm = getContext().getPackageManager();
+ if (pm.hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+ //Wait for Telephony FW and RIL initialization are done
+ TimeUnit.SECONDS.sleep(4);
+ }
}
@AfterClass
@@ -987,4 +993,4 @@
assertEquals(slot1Imei, primaryImei);
}
}
-}
\ No newline at end of file
+}