Merge "Fix testGetAllNetworkStateSnapshots for non-cellular" am: ddf3660af8 am: f786aa57e9 am: a0dd923ffb

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749483

Change-Id: I5b38f930b1e19868f709f75a4fc9a33eccc6b8ab
This commit is contained in:
Treehugger Robot
2021-07-01 08:13:14 +00:00
committed by Automerger Merge Worker

View File

@@ -501,6 +501,7 @@ public class ConnectivityManagerTest {
@Test
public void testGetAllNetworkStateSnapshots()
throws InterruptedException {
assumeTrue(mPackageManager.hasSystemFeature(FEATURE_TELEPHONY));
// Make sure cell is active to retrieve IMSI for verification in later step.
final Network cellNetwork = mCtsNetUtils.connectToCell();
final String subscriberId = getSubscriberIdForCellNetwork(cellNetwork);