Fix testGetAllNetworkStateSnapshots for non-cellular

bug: 192115694
Test: atest ConnectivityManagerTest#testGetAllNetworkStateSnapshots
Change-Id: Ie7f637248302f3e6b61be69ef4c6a7a906e69275
This commit is contained in:
Gaurav Sarode
2021-06-28 14:14:47 -07:00
parent a6c06af0fa
commit 4f0546ccbe

View File

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