summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ken Chen <cken@google.com> 2021-05-13 18:41:12 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-05-13 18:41:12 +0000
commite2431f5328b830f5844f8549e7336c77d4944e04 (patch)
tree639605dfb52a31268ef9299a16d232bab7a42e9d
parent777b5e12fe6fc346ceca0f50f56943b0a8d65e40 (diff)
parent4d9020efb519e2dfcecf6d89fc060cd259772d6a (diff)
[DO NOT MERGE] Revert "Reference unreachable netId from INetd" am: 4d9020efb5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705391 Change-Id: I9735b2c50de8899ca7c856ee02ade2fa3ec1a357
-rw-r--r--services/core/java/com/android/server/ConnectivityService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 051a00bde43e..7ffca45efedb 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/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(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,
@@ -6488,6 +6488,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