Reference unreachable netId from INetd

Bug: 181579204
Test: m; atest FrameworksNetTests
Change-Id: I7b59483d888e556ae50a37da539501b046295c16
This commit is contained in:
Ken Chen
2021-05-13 09:45:18 +08:00
parent 78ba677b16
commit 9c4436ec22

View File

@@ -1380,7 +1380,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
// arguments like the handler or the DnsResolver.
// TODO : remove this ; it is probably better handled with a sentinel request.
mNoServiceNetwork = new NetworkAgentInfo(null,
new Network(NO_SERVICE_NET_ID),
new Network(INetd.UNREACHABLE_NET_ID),
new NetworkInfo(TYPE_NONE, 0, "", ""),
new LinkProperties(), new NetworkCapabilities(),
new NetworkScore.Builder().setLegacyInt(0).build(), mContext, null,
@@ -6433,8 +6433,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
// Request used to optionally keep vehicle internal network always active
private final NetworkRequest mDefaultVehicleRequest;
// TODO replace with INetd.UNREACHABLE_NET_ID when available.
private static final int NO_SERVICE_NET_ID = 52;
// Sentinel NAI used to direct apps with default networks that should have no connectivity to a
// network with no service. This NAI should never be matched against, nor should any public API
// ever return the associated network. For this reason, this NAI is not in the list of available