From 7f159cf6401fe76cc1e8d89124f83228c9a7994a Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Mon, 30 Nov 2020 19:23:45 +0900 Subject: Add ConnectivityManager.TYPE_PROXY to SystemApi This follows other TYPE_* constants like TYPE_WIFI_P2P that are @SystemApi or public. TYPE_PROXY has a use-case for the system to set network policies based on proxy network templates. Although network types are deprecated, that use-case needs to be supported and significant amounts of network management would need to be rewritten to stop using network types. The constant needs to be API as ConnectivityManager is planned to move out of framework.jar, so only its formal API will be available to the system server. Bug: 174436414 Test: m Change-Id: I266ed6bc59f5eb72302afe14472c93933733c8f8 --- core/api/system-current.txt | 1 + core/java/android/net/ConnectivityManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index f6b1d0627312..7090ebe901a4 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -5986,6 +5986,7 @@ package android.net { field @Deprecated public static final int TETHER_ERROR_NO_ERROR = 0; // 0x0 field @Deprecated public static final int TETHER_ERROR_PROVISION_FAILED = 11; // 0xb field public static final int TYPE_NONE = -1; // 0xffffffff + field @Deprecated public static final int TYPE_PROXY = 16; // 0x10 field @Deprecated public static final int TYPE_WIFI_P2P = 13; // 0xd } diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index c28a901fba75..cf5d4e579f85 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -684,7 +684,7 @@ public class ConnectivityManager { * {@hide} */ @Deprecated - @UnsupportedAppUsage + @SystemApi public static final int TYPE_PROXY = 16; /** -- cgit v1.2.3-59-g8ed1b