Merge "Reference unreachable netId from INetd" am: 01be14fd53 am: 68413f8a69

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708326

Change-Id: I2f14897dda29c6ea4469952e56a0fa0e1c8a9a8f
This commit is contained in:
Treehugger Robot
2021-05-14 09:36:35 +00:00
committed by Automerger Merge Worker

View File

@@ -1394,7 +1394,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
// arguments like the handler or the DnsResolver. // arguments like the handler or the DnsResolver.
// TODO : remove this ; it is probably better handled with a sentinel request. // TODO : remove this ; it is probably better handled with a sentinel request.
mNoServiceNetwork = new NetworkAgentInfo(null, mNoServiceNetwork = new NetworkAgentInfo(null,
new Network(NO_SERVICE_NET_ID), new Network(INetd.UNREACHABLE_NET_ID),
new NetworkInfo(TYPE_NONE, 0, "", ""), new NetworkInfo(TYPE_NONE, 0, "", ""),
new LinkProperties(), new NetworkCapabilities(), new LinkProperties(), new NetworkCapabilities(),
new NetworkScore.Builder().setLegacyInt(0).build(), mContext, null, new NetworkScore.Builder().setLegacyInt(0).build(), mContext, null,
@@ -6488,8 +6488,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
// Request used to optionally keep vehicle internal network always active // Request used to optionally keep vehicle internal network always active
private final NetworkRequest mDefaultVehicleRequest; 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 // 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 // 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 // ever return the associated network. For this reason, this NAI is not in the list of available