Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 1 | // Signature format: 2.0 |
| 2 | package android.net { |
| 3 | |
| 4 | public final class ConnectivityFrameworkInitializer { |
| 5 | method public static void registerServiceWrappers(); |
| 6 | } |
| 7 | |
| 8 | public class ConnectivityManager { |
Chiachang Wang | f9294e7 | 2021-03-18 09:44:34 +0800 | [diff] [blame] | 9 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void factoryReset(); |
junyulai | b121137 | 2021-03-03 12:09:05 +0800 | [diff] [blame] | 10 | method @NonNull @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public java.util.List<android.net.NetworkStateSnapshot> getAllNetworkStateSnapshot(); |
Chiachang Wang | f9294e7 | 2021-03-18 09:44:34 +0800 | [diff] [blame] | 11 | method @Nullable public android.net.ProxyInfo getGlobalProxy(); |
lucaslin | 5cdbcfb | 2021-03-12 00:46:33 +0800 | [diff] [blame] | 12 | method @NonNull public static android.util.Range<java.lang.Integer> getIpSecNetIdRange(); |
lucaslin | e2cd02d | 2021-03-16 17:11:14 +0800 | [diff] [blame] | 13 | method @NonNull public static String getPrivateDnsMode(@NonNull android.content.Context); |
Lorenzo Colitti | b90bdbd | 2021-03-22 18:23:21 +0900 | [diff] [blame] | 14 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void registerDefaultNetworkCallbackAsUid(int, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 15 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void registerSystemDefaultNetworkCallback(@NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler); |
junyulai | dbb7046 | 2021-03-09 20:49:48 +0800 | [diff] [blame] | 16 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void requestBackgroundNetwork(@NonNull android.net.NetworkRequest, @NonNull android.os.Handler, @NonNull android.net.ConnectivityManager.NetworkCallback); |
lucaslin | 29278ee | 2021-03-22 11:51:27 +0800 | [diff] [blame] | 17 | method @Deprecated public boolean requestRouteToHostAddress(int, java.net.InetAddress); |
Chiachang Wang | f9294e7 | 2021-03-18 09:44:34 +0800 | [diff] [blame] | 18 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void setAcceptPartialConnectivity(@NonNull android.net.Network, boolean, boolean); |
| 19 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void setAcceptUnvalidated(@NonNull android.net.Network, boolean, boolean); |
| 20 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void setAvoidUnvalidated(@NonNull android.net.Network); |
| 21 | method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setGlobalProxy(@Nullable android.net.ProxyInfo); |
lucaslin | 29278ee | 2021-03-22 11:51:27 +0800 | [diff] [blame] | 22 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void setLegacyLockdownVpnEnabled(boolean); |
paulhu | 6865eb6 | 2021-03-25 12:36:56 +0800 | [diff] [blame] | 23 | method public static void setPrivateDnsMode(@NonNull android.content.Context, @NonNull String); |
Chalard Jean | 0a4aefc | 2021-03-03 16:37:13 +0900 | [diff] [blame] | 24 | method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setProfileNetworkPreference(@NonNull android.os.UserHandle, int, @Nullable java.util.concurrent.Executor, @Nullable Runnable); |
lucaslin | 29278ee | 2021-03-22 11:51:27 +0800 | [diff] [blame] | 25 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void setRequireVpnForUids(boolean, @NonNull java.util.Collection<android.util.Range<java.lang.Integer>>); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 26 | method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_TEST_NETWORKS, android.Manifest.permission.NETWORK_STACK}) public void simulateDataStall(int, long, @NonNull android.net.Network, @NonNull android.os.PersistableBundle); |
Remi NGUYEN VAN | 8238a76 | 2021-03-16 18:06:06 +0900 | [diff] [blame] | 27 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void startCaptivePortalApp(@NonNull android.net.Network); |
lucaslin | 10774b7 | 2021-03-17 14:16:01 +0800 | [diff] [blame] | 28 | method public void systemReady(); |
paulhu | b49c842 | 2021-04-07 16:18:13 +0800 | [diff] [blame^] | 29 | field public static final String ACTION_CLEAR_DNS_CACHE = "android.net.action.CLEAR_DNS_CACHE"; |
lucaslin | d89b298 | 2021-03-04 17:09:51 +0800 | [diff] [blame] | 30 | field public static final String ACTION_PROMPT_LOST_VALIDATION = "android.net.action.PROMPT_LOST_VALIDATION"; |
| 31 | field public static final String ACTION_PROMPT_PARTIAL_CONNECTIVITY = "android.net.action.PROMPT_PARTIAL_CONNECTIVITY"; |
| 32 | field public static final String ACTION_PROMPT_UNVALIDATED = "android.net.action.PROMPT_UNVALIDATED"; |
Sudheer Shanka | f1520bb | 2021-03-23 08:12:28 +0000 | [diff] [blame] | 33 | field public static final int BLOCKED_METERED_REASON_ADMIN_DISABLED = 262144; // 0x40000 |
| 34 | field public static final int BLOCKED_METERED_REASON_DATA_SAVER = 65536; // 0x10000 |
Lorenzo Colitti | 8ad5812 | 2021-03-18 00:54:57 +0900 | [diff] [blame] | 35 | field public static final int BLOCKED_METERED_REASON_MASK = -65536; // 0xffff0000 |
Sudheer Shanka | f1520bb | 2021-03-23 08:12:28 +0000 | [diff] [blame] | 36 | field public static final int BLOCKED_METERED_REASON_USER_RESTRICTED = 131072; // 0x20000 |
| 37 | field public static final int BLOCKED_REASON_APP_STANDBY = 4; // 0x4 |
| 38 | field public static final int BLOCKED_REASON_BATTERY_SAVER = 1; // 0x1 |
| 39 | field public static final int BLOCKED_REASON_DOZE = 2; // 0x2 |
Lorenzo Colitti | 8ad5812 | 2021-03-18 00:54:57 +0900 | [diff] [blame] | 40 | field public static final int BLOCKED_REASON_LOCKDOWN_VPN = 16; // 0x10 |
Sudheer Shanka | f1520bb | 2021-03-23 08:12:28 +0000 | [diff] [blame] | 41 | field public static final int BLOCKED_REASON_NONE = 0; // 0x0 |
| 42 | field public static final int BLOCKED_REASON_RESTRICTED_MODE = 8; // 0x8 |
lucaslin | 889dcda | 2021-03-12 17:56:09 +0800 | [diff] [blame] | 43 | field public static final String PRIVATE_DNS_MODE_OFF = "off"; |
| 44 | field public static final String PRIVATE_DNS_MODE_OPPORTUNISTIC = "opportunistic"; |
| 45 | field public static final String PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = "hostname"; |
Chalard Jean | bef6b09 | 2021-03-17 14:33:24 +0900 | [diff] [blame] | 46 | field public static final int PROFILE_NETWORK_PREFERENCE_DEFAULT = 0; // 0x0 |
| 47 | field public static final int PROFILE_NETWORK_PREFERENCE_ENTERPRISE = 1; // 0x1 |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 48 | } |
| 49 | |
Lorenzo Colitti | 8ad5812 | 2021-03-18 00:54:57 +0900 | [diff] [blame] | 50 | public static class ConnectivityManager.NetworkCallback { |
| 51 | method public void onBlockedStatusChanged(@NonNull android.net.Network, int); |
| 52 | } |
| 53 | |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 54 | public class ConnectivitySettingsManager { |
| 55 | method public static void clearGlobalProxy(@NonNull android.content.Context); |
| 56 | method @Nullable public static String getCaptivePortalHttpUrl(@NonNull android.content.Context); |
| 57 | method public static int getCaptivePortalMode(@NonNull android.content.Context, int); |
| 58 | method @NonNull public static java.time.Duration getConnectivityKeepPendingIntentDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 59 | method @NonNull public static android.util.Range<java.lang.Integer> getDnsResolverSampleRanges(@NonNull android.content.Context); |
| 60 | method @NonNull public static java.time.Duration getDnsResolverSampleValidityDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 61 | method public static int getDnsResolverSuccessThresholdPercent(@NonNull android.content.Context, int); |
| 62 | method @Nullable public static android.net.ProxyInfo getGlobalProxy(@NonNull android.content.Context); |
| 63 | method @NonNull public static java.time.Duration getMobileDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 64 | method public static boolean getMobileDataAlwaysOn(@NonNull android.content.Context, boolean); |
paulhu | 7a4eeed | 2021-03-25 13:17:58 +0800 | [diff] [blame] | 65 | method @Nullable public static String getMobileDataPreferredApps(@NonNull android.content.Context); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 66 | method public static int getNetworkAvoidBadWifi(@NonNull android.content.Context); |
| 67 | method @Nullable public static String getNetworkMeteredMultipathPreference(@NonNull android.content.Context); |
| 68 | method public static int getNetworkSwitchNotificationMaximumDailyCount(@NonNull android.content.Context, int); |
| 69 | method @NonNull public static java.time.Duration getNetworkSwitchNotificationRateDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 70 | method @NonNull public static String getPrivateDnsDefaultMode(@NonNull android.content.Context); |
| 71 | method @Nullable public static String getPrivateDnsHostname(@NonNull android.content.Context); |
| 72 | method public static boolean getWifiAlwaysRequested(@NonNull android.content.Context, boolean); |
| 73 | method @NonNull public static java.time.Duration getWifiDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 74 | method public static void setCaptivePortalHttpUrl(@NonNull android.content.Context, @Nullable String); |
| 75 | method public static void setCaptivePortalMode(@NonNull android.content.Context, int); |
| 76 | method public static void setConnectivityKeepPendingIntentDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 77 | method public static void setDnsResolverSampleRanges(@NonNull android.content.Context, @NonNull android.util.Range<java.lang.Integer>); |
| 78 | method public static void setDnsResolverSampleValidityDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 79 | method public static void setDnsResolverSuccessThresholdPercent(@NonNull android.content.Context, @IntRange(from=0, to=100) int); |
| 80 | method public static void setGlobalProxy(@NonNull android.content.Context, @NonNull android.net.ProxyInfo); |
| 81 | method public static void setMobileDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 82 | method public static void setMobileDataAlwaysOn(@NonNull android.content.Context, boolean); |
paulhu | 7a4eeed | 2021-03-25 13:17:58 +0800 | [diff] [blame] | 83 | method public static void setMobileDataPreferredApps(@NonNull android.content.Context, @Nullable String); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 84 | method public static void setNetworkAvoidBadWifi(@NonNull android.content.Context, int); |
| 85 | method public static void setNetworkMeteredMultipathPreference(@NonNull android.content.Context, @NonNull String); |
| 86 | method public static void setNetworkSwitchNotificationMaximumDailyCount(@NonNull android.content.Context, @IntRange(from=0) int); |
| 87 | method public static void setNetworkSwitchNotificationRateDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 88 | method public static void setPrivateDnsDefaultMode(@NonNull android.content.Context, @NonNull String); |
| 89 | method public static void setPrivateDnsHostname(@NonNull android.content.Context, @Nullable String); |
| 90 | method public static void setWifiAlwaysRequested(@NonNull android.content.Context, boolean); |
| 91 | method public static void setWifiDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 92 | field public static final int CAPTIVE_PORTAL_MODE_AVOID = 2; // 0x2 |
| 93 | field public static final int CAPTIVE_PORTAL_MODE_IGNORE = 0; // 0x0 |
| 94 | field public static final int CAPTIVE_PORTAL_MODE_PROMPT = 1; // 0x1 |
| 95 | field public static final int NETWORK_AVOID_BAD_WIFI_AVOID = 2; // 0x2 |
| 96 | field public static final int NETWORK_AVOID_BAD_WIFI_IGNORE = 0; // 0x0 |
| 97 | field public static final int NETWORK_AVOID_BAD_WIFI_PROMPT = 1; // 0x1 |
| 98 | } |
| 99 | |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 100 | public final class NetworkAgentConfig implements android.os.Parcelable { |
| 101 | method @Nullable public String getSubscriberId(); |
lucaslin | 0e345e9 | 2021-03-22 15:07:41 +0800 | [diff] [blame] | 102 | method public boolean isBypassableVpn(); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | public static final class NetworkAgentConfig.Builder { |
lucaslin | 0e345e9 | 2021-03-22 15:07:41 +0800 | [diff] [blame] | 106 | method @NonNull public android.net.NetworkAgentConfig.Builder setBypassableVpn(boolean); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 107 | method @NonNull public android.net.NetworkAgentConfig.Builder setSubscriberId(@Nullable String); |
| 108 | } |
| 109 | |
| 110 | public final class NetworkCapabilities implements android.os.Parcelable { |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 111 | method @Nullable public java.util.Set<android.util.Range<java.lang.Integer>> getUids(); |
junyulai | b15b7db | 2021-03-16 10:24:43 +0800 | [diff] [blame] | 112 | method public boolean hasUnwantedCapability(int); |
Roshan Pius | e2d2838 | 2021-02-23 08:47:39 -0800 | [diff] [blame] | 113 | field public static final long REDACT_ALL = -1L; // 0xffffffffffffffffL |
| 114 | field public static final long REDACT_FOR_ACCESS_FINE_LOCATION = 1L; // 0x1L |
| 115 | field public static final long REDACT_FOR_LOCAL_MAC_ADDRESS = 2L; // 0x2L |
| 116 | field public static final long REDACT_FOR_NETWORK_SETTINGS = 4L; // 0x4L |
| 117 | field public static final long REDACT_NONE = 0L; // 0x0L |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 118 | field public static final int TRANSPORT_TEST = 7; // 0x7 |
| 119 | } |
| 120 | |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 121 | public static final class NetworkCapabilities.Builder { |
| 122 | method @NonNull public android.net.NetworkCapabilities.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>); |
| 123 | } |
| 124 | |
junyulai | b15b7db | 2021-03-16 10:24:43 +0800 | [diff] [blame] | 125 | public class NetworkRequest implements android.os.Parcelable { |
lifr | b4dab37 | 2021-03-11 20:11:09 +0800 | [diff] [blame] | 126 | method @NonNull public int[] getUnwantedCapabilities(); |
junyulai | b15b7db | 2021-03-16 10:24:43 +0800 | [diff] [blame] | 127 | method public boolean hasUnwantedCapability(int); |
| 128 | } |
| 129 | |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 130 | public static class NetworkRequest.Builder { |
junyulai | b15b7db | 2021-03-16 10:24:43 +0800 | [diff] [blame] | 131 | method @NonNull public android.net.NetworkRequest.Builder addUnwantedCapability(int); |
| 132 | method @NonNull public android.net.NetworkRequest.Builder removeUnwantedCapability(int); |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 133 | method @NonNull public android.net.NetworkRequest.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>); |
| 134 | } |
| 135 | |
Remi NGUYEN VAN | 25dcabf | 2021-03-15 10:20:40 +0900 | [diff] [blame] | 136 | public class ParseException extends java.lang.RuntimeException { |
| 137 | ctor public ParseException(@NonNull String); |
| 138 | ctor public ParseException(@NonNull String, @NonNull Throwable); |
| 139 | } |
| 140 | |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 141 | public final class TcpRepairWindow { |
| 142 | ctor public TcpRepairWindow(int, int, int, int, int, int); |
| 143 | field public final int maxWindow; |
| 144 | field public final int rcvWnd; |
| 145 | field public final int rcvWndScale; |
| 146 | field public final int rcvWup; |
| 147 | field public final int sndWl1; |
| 148 | field public final int sndWnd; |
| 149 | } |
| 150 | |
| 151 | public final class TestNetworkInterface implements android.os.Parcelable { |
| 152 | ctor public TestNetworkInterface(@NonNull android.os.ParcelFileDescriptor, @NonNull String); |
| 153 | method public int describeContents(); |
| 154 | method @NonNull public android.os.ParcelFileDescriptor getFileDescriptor(); |
| 155 | method @NonNull public String getInterfaceName(); |
| 156 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 157 | field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkInterface> CREATOR; |
| 158 | } |
| 159 | |
| 160 | public class TestNetworkManager { |
| 161 | method @NonNull public android.net.TestNetworkInterface createTapInterface(); |
| 162 | method @NonNull public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>); |
| 163 | method public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder); |
| 164 | method public void teardownTestNetwork(@NonNull android.net.Network); |
| 165 | field public static final String TEST_TAP_PREFIX = "testtap"; |
| 166 | } |
| 167 | |
Remi NGUYEN VAN | ea33ac9 | 2021-02-04 14:20:19 +0900 | [diff] [blame] | 168 | public final class TestNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable { |
| 169 | ctor public TestNetworkSpecifier(@NonNull String); |
| 170 | method public int describeContents(); |
| 171 | method @Nullable public String getInterfaceName(); |
| 172 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 173 | field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkSpecifier> CREATOR; |
| 174 | } |
| 175 | |
Roshan Pius | e2d2838 | 2021-02-23 08:47:39 -0800 | [diff] [blame] | 176 | public interface TransportInfo { |
| 177 | method public default long getApplicableRedactions(); |
| 178 | method @NonNull public default android.net.TransportInfo makeCopy(long); |
| 179 | } |
| 180 | |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 181 | public final class VpnTransportInfo implements android.os.Parcelable android.net.TransportInfo { |
lifr | 65b9f96 | 2021-03-24 18:38:37 +0800 | [diff] [blame] | 182 | ctor public VpnTransportInfo(int, @Nullable String); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 183 | method public int describeContents(); |
lifr | 65b9f96 | 2021-03-24 18:38:37 +0800 | [diff] [blame] | 184 | method @NonNull public android.net.VpnTransportInfo makeCopy(long); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 185 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 186 | field @NonNull public static final android.os.Parcelable.Creator<android.net.VpnTransportInfo> CREATOR; |
lifr | 65b9f96 | 2021-03-24 18:38:37 +0800 | [diff] [blame] | 187 | field @Nullable public final String sessionId; |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 188 | field public final int type; |
| 189 | } |
| 190 | |
| 191 | } |
| 192 | |