From 665a2cc1f0d9df6f73fbeaf9ce46a74afda71183 Mon Sep 17 00:00:00 2001 From: markchien Date: Wed, 4 Dec 2019 14:01:46 +0800 Subject: [PATCH] Expose netId to SystemApi Tethering will be build as unblundled APP. It can't use @hide API anymore. Expose netId for tethering because it need to set proxy dns server with netId. Bug: 144758139 Test: build Change-Id: Ifefa791940874617bb479f5c23488d14be87f45e --- api/system-current.txt | 1 + core/java/android/net/Network.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/system-current.txt b/api/system-current.txt index 492354ae661a5..70877093b849d 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -4175,6 +4175,7 @@ package android.net { public class Network implements android.os.Parcelable { ctor public Network(@NonNull android.net.Network); method @NonNull public android.net.Network getPrivateDnsBypassingCopy(); + field public final int netId; } public final class NetworkCapabilities implements android.os.Parcelable { diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java index 3f56def6d7d58..f12ba1367d985 100644 --- a/core/java/android/net/Network.java +++ b/core/java/android/net/Network.java @@ -63,7 +63,7 @@ public class Network implements Parcelable { /** * @hide */ - @UnsupportedAppUsage + @SystemApi public final int netId; // Objects used to perform per-network operations such as getSocketFactory