blob: 713d35af36a717f2f9f9ad5603e4c941191d9bb4 [file] [log] [blame]
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +09001// Signature format: 2.0
2package android.net {
3
4 public final class ConnectivityFrameworkInitializer {
5 method public static void registerServiceWrappers();
6 }
7
8 public class ConnectivityManager {
Chiachang Wangf9294e72021-03-18 09:44:34 +08009 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void factoryReset();
Aaron Huangda103b32021-04-17 13:46:25 +080010 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> getAllNetworkStateSnapshots();
Chiachang Wangf9294e72021-03-18 09:44:34 +080011 method @Nullable public android.net.ProxyInfo getGlobalProxy();
lucaslin5cdbcfb2021-03-12 00:46:33 +080012 method @NonNull public static android.util.Range<java.lang.Integer> getIpSecNetIdRange();
lucaslinc582d502022-01-27 09:07:00 +080013 method @Nullable @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public android.net.LinkProperties redactLinkPropertiesForPackage(@NonNull android.net.LinkProperties, int, @NonNull String);
14 method @Nullable @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public android.net.NetworkCapabilities redactNetworkCapabilitiesForPackage(@NonNull android.net.NetworkCapabilities, int, @NonNull String);
Chiachang Wang9075ae32021-04-20 15:41:24 +080015 method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void registerDefaultNetworkCallbackForUid(int, @NonNull android.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler);
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090016 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);
markchien00a0bed2022-01-13 23:46:13 +080017 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void replaceFirewallChain(int, @NonNull int[]);
junyulai8c8ac362021-04-15 00:39:49 +080018 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.net.ConnectivityManager.NetworkCallback, @NonNull android.os.Handler);
lucaslin29278ee2021-03-22 11:51:27 +080019 method @Deprecated public boolean requestRouteToHostAddress(int, java.net.InetAddress);
Chiachang Wangf9294e72021-03-18 09:44:34 +080020 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);
21 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);
22 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);
markchien98a6f952022-01-13 23:43:53 +080023 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void setFirewallChainEnabled(int, boolean);
Chiachang Wangf9294e72021-03-18 09:44:34 +080024 method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setGlobalProxy(@Nullable android.net.ProxyInfo);
lucaslin29278ee2021-03-22 11:51:27 +080025 method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void setLegacyLockdownVpnEnabled(boolean);
Sooraj Sasindrane7aee272021-11-24 20:26:55 -080026 method @Deprecated @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setProfileNetworkPreference(@NonNull android.os.UserHandle, int, @Nullable java.util.concurrent.Executor, @Nullable Runnable);
27 method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setProfileNetworkPreferences(@NonNull android.os.UserHandle, @NonNull java.util.List<android.net.ProfileNetworkPreference>, @Nullable java.util.concurrent.Executor, @Nullable Runnable);
lucaslin29278ee2021-03-22 11:51:27 +080028 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 VANf15fc7f2021-01-28 13:37:03 +090029 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 VAN8238a762021-03-16 18:06:06 +090030 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);
markchien9c806112022-01-11 23:28:23 +080031 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void swapActiveStatsMap();
lucaslin10774b72021-03-17 14:16:01 +080032 method public void systemReady();
markchiene1561fa2021-12-09 22:00:56 +080033 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void updateFirewallRule(int, int, boolean);
markchien738ad912021-12-09 18:15:45 +080034 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void updateMeteredNetworkAllowList(int, boolean);
35 method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void updateMeteredNetworkDenyList(int, boolean);
paulhub49c8422021-04-07 16:18:13 +080036 field public static final String ACTION_CLEAR_DNS_CACHE = "android.net.action.CLEAR_DNS_CACHE";
lucaslind89b2982021-03-04 17:09:51 +080037 field public static final String ACTION_PROMPT_LOST_VALIDATION = "android.net.action.PROMPT_LOST_VALIDATION";
38 field public static final String ACTION_PROMPT_PARTIAL_CONNECTIVITY = "android.net.action.PROMPT_PARTIAL_CONNECTIVITY";
39 field public static final String ACTION_PROMPT_UNVALIDATED = "android.net.action.PROMPT_UNVALIDATED";
Sudheer Shankaf1520bb2021-03-23 08:12:28 +000040 field public static final int BLOCKED_METERED_REASON_ADMIN_DISABLED = 262144; // 0x40000
41 field public static final int BLOCKED_METERED_REASON_DATA_SAVER = 65536; // 0x10000
Lorenzo Colitti8ad58122021-03-18 00:54:57 +090042 field public static final int BLOCKED_METERED_REASON_MASK = -65536; // 0xffff0000
Sudheer Shankaf1520bb2021-03-23 08:12:28 +000043 field public static final int BLOCKED_METERED_REASON_USER_RESTRICTED = 131072; // 0x20000
44 field public static final int BLOCKED_REASON_APP_STANDBY = 4; // 0x4
45 field public static final int BLOCKED_REASON_BATTERY_SAVER = 1; // 0x1
46 field public static final int BLOCKED_REASON_DOZE = 2; // 0x2
Lorenzo Colitti8ad58122021-03-18 00:54:57 +090047 field public static final int BLOCKED_REASON_LOCKDOWN_VPN = 16; // 0x10
Robert Horvath2dac9482021-11-15 15:49:37 +010048 field public static final int BLOCKED_REASON_LOW_POWER_STANDBY = 32; // 0x20
Sudheer Shankaf1520bb2021-03-23 08:12:28 +000049 field public static final int BLOCKED_REASON_NONE = 0; // 0x0
50 field public static final int BLOCKED_REASON_RESTRICTED_MODE = 8; // 0x8
markchiene1561fa2021-12-09 22:00:56 +080051 field public static final int FIREWALL_CHAIN_DOZABLE = 1; // 0x1
Robert Horvath34cba142022-01-27 19:52:43 +010052 field public static final int FIREWALL_CHAIN_LOW_POWER_STANDBY = 5; // 0x5
markchiene1561fa2021-12-09 22:00:56 +080053 field public static final int FIREWALL_CHAIN_POWERSAVE = 3; // 0x3
54 field public static final int FIREWALL_CHAIN_RESTRICTED = 4; // 0x4
55 field public static final int FIREWALL_CHAIN_STANDBY = 2; // 0x2
Chalard Jeanbef6b092021-03-17 14:33:24 +090056 field public static final int PROFILE_NETWORK_PREFERENCE_DEFAULT = 0; // 0x0
57 field public static final int PROFILE_NETWORK_PREFERENCE_ENTERPRISE = 1; // 0x1
Sooraj Sasindran06baf4c2021-11-29 12:21:09 -080058 field public static final int PROFILE_NETWORK_PREFERENCE_ENTERPRISE_NO_FALLBACK = 2; // 0x2
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +090059 }
60
Lorenzo Colitti8ad58122021-03-18 00:54:57 +090061 public static class ConnectivityManager.NetworkCallback {
62 method public void onBlockedStatusChanged(@NonNull android.net.Network, int);
63 }
64
paulhu94430952021-03-23 00:24:50 +080065 public class ConnectivitySettingsManager {
66 method public static void clearGlobalProxy(@NonNull android.content.Context);
67 method @Nullable public static String getCaptivePortalHttpUrl(@NonNull android.content.Context);
68 method public static int getCaptivePortalMode(@NonNull android.content.Context, int);
69 method @NonNull public static java.time.Duration getConnectivityKeepPendingIntentDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
70 method @NonNull public static android.util.Range<java.lang.Integer> getDnsResolverSampleRanges(@NonNull android.content.Context);
71 method @NonNull public static java.time.Duration getDnsResolverSampleValidityDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
72 method public static int getDnsResolverSuccessThresholdPercent(@NonNull android.content.Context, int);
73 method @Nullable public static android.net.ProxyInfo getGlobalProxy(@NonNull android.content.Context);
Patrick Rohra2084362022-01-03 15:55:52 +010074 method public static long getIngressRateLimitInBytesPerSecond(@NonNull android.content.Context);
paulhu94430952021-03-23 00:24:50 +080075 method @NonNull public static java.time.Duration getMobileDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration);
76 method public static boolean getMobileDataAlwaysOn(@NonNull android.content.Context, boolean);
paulhu344c1162021-05-11 09:42:50 +080077 method @NonNull public static java.util.Set<java.lang.Integer> getMobileDataPreferredUids(@NonNull android.content.Context);
paulhu94430952021-03-23 00:24:50 +080078 method public static int getNetworkAvoidBadWifi(@NonNull android.content.Context);
79 method @Nullable public static String getNetworkMeteredMultipathPreference(@NonNull android.content.Context);
80 method public static int getNetworkSwitchNotificationMaximumDailyCount(@NonNull android.content.Context, int);
81 method @NonNull public static java.time.Duration getNetworkSwitchNotificationRateDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
82 method @NonNull public static String getPrivateDnsDefaultMode(@NonNull android.content.Context);
83 method @Nullable public static String getPrivateDnsHostname(@NonNull android.content.Context);
lucaslin57f9ba82021-04-23 21:03:39 +080084 method public static int getPrivateDnsMode(@NonNull android.content.Context);
paulhu91e78062021-05-26 16:16:57 +080085 method @NonNull public static java.util.Set<java.lang.Integer> getUidsAllowedOnRestrictedNetworks(@NonNull android.content.Context);
paulhu94430952021-03-23 00:24:50 +080086 method public static boolean getWifiAlwaysRequested(@NonNull android.content.Context, boolean);
87 method @NonNull public static java.time.Duration getWifiDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration);
88 method public static void setCaptivePortalHttpUrl(@NonNull android.content.Context, @Nullable String);
89 method public static void setCaptivePortalMode(@NonNull android.content.Context, int);
90 method public static void setConnectivityKeepPendingIntentDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
91 method public static void setDnsResolverSampleRanges(@NonNull android.content.Context, @NonNull android.util.Range<java.lang.Integer>);
92 method public static void setDnsResolverSampleValidityDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
93 method public static void setDnsResolverSuccessThresholdPercent(@NonNull android.content.Context, @IntRange(from=0, to=100) int);
94 method public static void setGlobalProxy(@NonNull android.content.Context, @NonNull android.net.ProxyInfo);
Patrick Rohrca7e5782022-02-18 10:34:20 +010095 method public static void setIngressRateLimitInBytesPerSecond(@NonNull android.content.Context, @IntRange(from=-1L, to=4294967295L) long);
paulhu94430952021-03-23 00:24:50 +080096 method public static void setMobileDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration);
97 method public static void setMobileDataAlwaysOn(@NonNull android.content.Context, boolean);
paulhu344c1162021-05-11 09:42:50 +080098 method public static void setMobileDataPreferredUids(@NonNull android.content.Context, @NonNull java.util.Set<java.lang.Integer>);
paulhu94430952021-03-23 00:24:50 +080099 method public static void setNetworkAvoidBadWifi(@NonNull android.content.Context, int);
100 method public static void setNetworkMeteredMultipathPreference(@NonNull android.content.Context, @NonNull String);
101 method public static void setNetworkSwitchNotificationMaximumDailyCount(@NonNull android.content.Context, @IntRange(from=0) int);
102 method public static void setNetworkSwitchNotificationRateDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
lucaslin57f9ba82021-04-23 21:03:39 +0800103 method public static void setPrivateDnsDefaultMode(@NonNull android.content.Context, @NonNull int);
paulhu94430952021-03-23 00:24:50 +0800104 method public static void setPrivateDnsHostname(@NonNull android.content.Context, @Nullable String);
lucaslin57f9ba82021-04-23 21:03:39 +0800105 method public static void setPrivateDnsMode(@NonNull android.content.Context, int);
paulhu91e78062021-05-26 16:16:57 +0800106 method public static void setUidsAllowedOnRestrictedNetworks(@NonNull android.content.Context, @NonNull java.util.Set<java.lang.Integer>);
paulhu94430952021-03-23 00:24:50 +0800107 method public static void setWifiAlwaysRequested(@NonNull android.content.Context, boolean);
108 method public static void setWifiDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration);
109 field public static final int CAPTIVE_PORTAL_MODE_AVOID = 2; // 0x2
110 field public static final int CAPTIVE_PORTAL_MODE_IGNORE = 0; // 0x0
111 field public static final int CAPTIVE_PORTAL_MODE_PROMPT = 1; // 0x1
112 field public static final int NETWORK_AVOID_BAD_WIFI_AVOID = 2; // 0x2
113 field public static final int NETWORK_AVOID_BAD_WIFI_IGNORE = 0; // 0x0
114 field public static final int NETWORK_AVOID_BAD_WIFI_PROMPT = 1; // 0x1
lucaslin57f9ba82021-04-23 21:03:39 +0800115 field public static final int PRIVATE_DNS_MODE_OFF = 1; // 0x1
116 field public static final int PRIVATE_DNS_MODE_OPPORTUNISTIC = 2; // 0x2
117 field public static final int PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = 3; // 0x3
paulhu94430952021-03-23 00:24:50 +0800118 }
119
Mingguang Xu2d87c612021-10-29 00:18:55 -0700120 public final class DhcpOption implements android.os.Parcelable {
121 ctor public DhcpOption(byte, @Nullable byte[]);
122 method public int describeContents();
123 method public byte getType();
124 method @Nullable public byte[] getValue();
125 method public void writeToParcel(@NonNull android.os.Parcel, int);
126 field @NonNull public static final android.os.Parcelable.Creator<android.net.DhcpOption> CREATOR;
127 }
128
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900129 public final class NetworkAgentConfig implements android.os.Parcelable {
130 method @Nullable public String getSubscriberId();
Chiachang Wang865511a2022-01-27 17:08:41 +0800131 method public boolean getVpnRequiresValidation();
lucaslin0e345e92021-03-22 15:07:41 +0800132 method public boolean isBypassableVpn();
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900133 }
134
135 public static final class NetworkAgentConfig.Builder {
lucaslin0e345e92021-03-22 15:07:41 +0800136 method @NonNull public android.net.NetworkAgentConfig.Builder setBypassableVpn(boolean);
Chiachang Wangf8908742022-02-08 15:45:11 +0800137 method @NonNull public android.net.NetworkAgentConfig.Builder setLocalRoutesExcludedForVpn(boolean);
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900138 method @NonNull public android.net.NetworkAgentConfig.Builder setSubscriberId(@Nullable String);
Chiachang Wang865511a2022-01-27 17:08:41 +0800139 method @NonNull public android.net.NetworkAgentConfig.Builder setVpnRequiresValidation(boolean);
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900140 }
141
142 public final class NetworkCapabilities implements android.os.Parcelable {
Chalard Jean41a602d2022-01-25 22:54:55 +0900143 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public java.util.Set<java.lang.Integer> getAccessUids();
Chiachang Wang628cb112021-03-19 00:45:39 +0000144 method @Nullable public java.util.Set<android.util.Range<java.lang.Integer>> getUids();
Lorenzo Colitti395fafb2021-04-27 10:37:09 +0900145 method public boolean hasForbiddenCapability(int);
Roshan Piuse2d28382021-02-23 08:47:39 -0800146 field public static final long REDACT_ALL = -1L; // 0xffffffffffffffffL
147 field public static final long REDACT_FOR_ACCESS_FINE_LOCATION = 1L; // 0x1L
148 field public static final long REDACT_FOR_LOCAL_MAC_ADDRESS = 2L; // 0x2L
149 field public static final long REDACT_FOR_NETWORK_SETTINGS = 4L; // 0x4L
150 field public static final long REDACT_NONE = 0L; // 0x0L
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900151 field public static final int TRANSPORT_TEST = 7; // 0x7
152 }
153
Chiachang Wang628cb112021-03-19 00:45:39 +0000154 public static final class NetworkCapabilities.Builder {
Chalard Jean41a602d2022-01-25 22:54:55 +0900155 method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setAccessUids(@NonNull java.util.Set<java.lang.Integer>);
Chiachang Wang628cb112021-03-19 00:45:39 +0000156 method @NonNull public android.net.NetworkCapabilities.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>);
157 }
158
junyulaib15b7db2021-03-16 10:24:43 +0800159 public class NetworkRequest implements android.os.Parcelable {
Sooraj Sasindran7e9b25e2022-01-25 14:49:29 -0800160 method @NonNull public int[] getEnterpriseIds();
Lorenzo Colitti395fafb2021-04-27 10:37:09 +0900161 method @NonNull public int[] getForbiddenCapabilities();
Sooraj Sasindran7e9b25e2022-01-25 14:49:29 -0800162 method public boolean hasEnterpriseId(int);
Lorenzo Colitti395fafb2021-04-27 10:37:09 +0900163 method public boolean hasForbiddenCapability(int);
junyulaib15b7db2021-03-16 10:24:43 +0800164 }
165
Chiachang Wang628cb112021-03-19 00:45:39 +0000166 public static class NetworkRequest.Builder {
Lorenzo Colitti395fafb2021-04-27 10:37:09 +0900167 method @NonNull public android.net.NetworkRequest.Builder addForbiddenCapability(int);
168 method @NonNull public android.net.NetworkRequest.Builder removeForbiddenCapability(int);
Chiachang Wang628cb112021-03-19 00:45:39 +0000169 method @NonNull public android.net.NetworkRequest.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>);
170 }
171
Sooraj Sasindrane7aee272021-11-24 20:26:55 -0800172 public final class ProfileNetworkPreference implements android.os.Parcelable {
173 method public int describeContents();
Sooraj Sasindran499117f2021-11-29 12:40:09 -0800174 method @NonNull public java.util.List<java.lang.Integer> getExcludedUids();
175 method @NonNull public java.util.List<java.lang.Integer> getIncludedUids();
Sooraj Sasindrane7aee272021-11-24 20:26:55 -0800176 method public int getPreference();
Sooraj Sasindranf4a58dc2022-01-21 13:37:08 -0800177 method public int getPreferenceEnterpriseId();
Sooraj Sasindrane7aee272021-11-24 20:26:55 -0800178 method public void writeToParcel(@NonNull android.os.Parcel, int);
179 field @NonNull public static final android.os.Parcelable.Creator<android.net.ProfileNetworkPreference> CREATOR;
180 }
181
182 public static final class ProfileNetworkPreference.Builder {
183 ctor public ProfileNetworkPreference.Builder();
184 method @NonNull public android.net.ProfileNetworkPreference build();
Sooraj Sasindran499117f2021-11-29 12:40:09 -0800185 method @NonNull public android.net.ProfileNetworkPreference.Builder setExcludedUids(@Nullable java.util.List<java.lang.Integer>);
186 method @NonNull public android.net.ProfileNetworkPreference.Builder setIncludedUids(@Nullable java.util.List<java.lang.Integer>);
Sooraj Sasindrane7aee272021-11-24 20:26:55 -0800187 method @NonNull public android.net.ProfileNetworkPreference.Builder setPreference(int);
Sooraj Sasindranf4a58dc2022-01-21 13:37:08 -0800188 method @NonNull public android.net.ProfileNetworkPreference.Builder setPreferenceEnterpriseId(int);
Sooraj Sasindrane7aee272021-11-24 20:26:55 -0800189 }
190
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900191 public final class TestNetworkInterface implements android.os.Parcelable {
192 ctor public TestNetworkInterface(@NonNull android.os.ParcelFileDescriptor, @NonNull String);
193 method public int describeContents();
194 method @NonNull public android.os.ParcelFileDescriptor getFileDescriptor();
195 method @NonNull public String getInterfaceName();
196 method public void writeToParcel(@NonNull android.os.Parcel, int);
197 field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkInterface> CREATOR;
198 }
199
200 public class TestNetworkManager {
Remi NGUYEN VANc5174c32021-04-08 16:08:46 +0900201 method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTapInterface();
202 method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>);
203 method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder);
204 method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void teardownTestNetwork(@NonNull android.net.Network);
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900205 field public static final String TEST_TAP_PREFIX = "testtap";
206 }
207
Remi NGUYEN VANea33ac92021-02-04 14:20:19 +0900208 public final class TestNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
209 ctor public TestNetworkSpecifier(@NonNull String);
210 method public int describeContents();
211 method @Nullable public String getInterfaceName();
212 method public void writeToParcel(@NonNull android.os.Parcel, int);
213 field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkSpecifier> CREATOR;
214 }
215
Roshan Piuse2d28382021-02-23 08:47:39 -0800216 public interface TransportInfo {
217 method public default long getApplicableRedactions();
218 method @NonNull public default android.net.TransportInfo makeCopy(long);
219 }
220
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900221 public final class VpnTransportInfo implements android.os.Parcelable android.net.TransportInfo {
lifr65b9f962021-03-24 18:38:37 +0800222 ctor public VpnTransportInfo(int, @Nullable String);
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900223 method public int describeContents();
Chiachang Wang9075ae32021-04-20 15:41:24 +0800224 method @Nullable public String getSessionId();
225 method public int getType();
lifr65b9f962021-03-24 18:38:37 +0800226 method @NonNull public android.net.VpnTransportInfo makeCopy(long);
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900227 method public void writeToParcel(@NonNull android.os.Parcel, int);
228 field @NonNull public static final android.os.Parcelable.Creator<android.net.VpnTransportInfo> CREATOR;
Remi NGUYEN VANf15fc7f2021-01-28 13:37:03 +0900229 }
230
231}
232