From d901acbdfb0c6074a61c97ca06991ea6c29cf705 Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Thu, 13 May 2021 17:40:51 +0000 Subject: [PATCH] [DO NOT MERGE] Revert "Reference unreachable netId from INetd" This reverts commit 8a3400d1343d3e7321df7d2807398d9216799833. Reason for revert: Automerge conflict on sc-dev. The target file has been moved to other folder in sc-dev (ag/14516148). Revert this change and check-in again from AOSP bases on aosp/1706845. Change-Id: I93a8bf4a3f59d789d88adceb3760c586b9951750 --- .../core/java/com/android/server/ConnectivityService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 539cfd5491..39a990cf5d 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -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(INetd.UNREACHABLE_NET_ID), + new Network(NO_SERVICE_NET_ID), new NetworkInfo(TYPE_NONE, 0, "", ""), new LinkProperties(), new NetworkCapabilities(), new NetworkScore.Builder().setLegacyInt(0).build(), mContext, null, @@ -6433,6 +6433,8 @@ 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