Revert isDefaultNetworkActive behavior when there is no default network

aosp/2605757 updated isDefaultNetworkActive returns false when there is
no default network.
But this change was not merged to U release branch and this change was
not well tested by dogfooding.
So this CL reverts the isDefaultNetworkActivity behavior change.

Bug: 279380356
Bug: 291870075
Test: atest FrameworksNetTests
Change-Id: Id88662faea9eeaba93d59ab2729f6204a3631ab1
This commit is contained in:
Motomu Utsumi
2023-07-31 19:26:18 +09:00
parent 1e51a64988
commit 51e7a60359
2 changed files with 9 additions and 5 deletions

View File

@@ -11328,7 +11328,8 @@ public class ConnectivityServiceTest {
@Test
public void testIsDefaultNetworkActiveNoDefaultNetwork() throws Exception {
assertFalse(mCm.isDefaultNetworkActive());
// isDefaultNetworkActive returns true if there is no default network, which is known issue.
assertTrue(mCm.isDefaultNetworkActive());
final LinkProperties cellLp = new LinkProperties();
cellLp.setInterfaceName(MOBILE_IFNAME);
@@ -11340,7 +11341,7 @@ public class ConnectivityServiceTest {
mCellAgent.disconnect();
waitForIdle();
assertFalse(mCm.isDefaultNetworkActive());
assertTrue(mCm.isDefaultNetworkActive());
}
@Test