From 4f612fae1f3176cf0e662400155377a2a3286bc1 Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Fri, 14 May 2021 14:30:43 +0800 Subject: [PATCH] Reference unreachable netId from INetd Bug: 181579204 Test: m; atest FrameworksNetTests Change-Id: Id0d30363abe583459a8022e7400aab1dd4f72939 --- service/src/com/android/server/ConnectivityService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java index 7ffca45efe..051a00bde4 100644 --- a/service/src/com/android/server/ConnectivityService.java +++ b/service/src/com/android/server/ConnectivityService.java @@ -1394,7 +1394,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, @@ -6488,8 +6488,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