xref: /aosp_15_r20/prebuilts/sdk/33/module-lib/api/framework-connectivity.txt (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0
2*344a7f5eSAndroid Build Coastguard Workerpackage android.net {
3*344a7f5eSAndroid Build Coastguard Worker
4*344a7f5eSAndroid Build Coastguard Worker  public final class ConnectivityFrameworkInitializer {
5*344a7f5eSAndroid Build Coastguard Worker    method public static void registerServiceWrappers();
6*344a7f5eSAndroid Build Coastguard Worker  }
7*344a7f5eSAndroid Build Coastguard Worker
8*344a7f5eSAndroid Build Coastguard Worker  public class ConnectivityManager {
9*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void addUidToMeteredNetworkAllowList(int);
10*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void addUidToMeteredNetworkDenyList(int);
11*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void factoryReset();
12*344a7f5eSAndroid Build Coastguard Worker    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();
13*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public android.net.ProxyInfo getGlobalProxy();
14*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static android.util.Range<java.lang.Integer> getIpSecNetIdRange();
15*344a7f5eSAndroid Build Coastguard Worker    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 getRedactedLinkPropertiesForPackage(@NonNull android.net.LinkProperties, int, @NonNull String);
16*344a7f5eSAndroid Build Coastguard Worker    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 getRedactedNetworkCapabilitiesForPackage(@NonNull android.net.NetworkCapabilities, int, @NonNull String);
17*344a7f5eSAndroid Build Coastguard Worker    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);
18*344a7f5eSAndroid Build Coastguard Worker    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);
19*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void removeUidFromMeteredNetworkAllowList(int);
20*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void removeUidFromMeteredNetworkDenyList(int);
21*344a7f5eSAndroid Build Coastguard Worker    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[]);
22*344a7f5eSAndroid Build Coastguard Worker    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);
23*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public boolean requestRouteToHostAddress(int, java.net.InetAddress);
24*344a7f5eSAndroid Build Coastguard Worker    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);
25*344a7f5eSAndroid Build Coastguard Worker    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);
26*344a7f5eSAndroid Build Coastguard Worker    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);
27*344a7f5eSAndroid Build Coastguard Worker    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);
28*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setGlobalProxy(@Nullable android.net.ProxyInfo);
29*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void setLegacyLockdownVpnEnabled(boolean);
30*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setProfileNetworkPreference(@NonNull android.os.UserHandle, int, @Nullable java.util.concurrent.Executor, @Nullable Runnable);
31*344a7f5eSAndroid Build Coastguard Worker    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);
32*344a7f5eSAndroid Build Coastguard Worker    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>>);
33*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void setUidFirewallRule(int, int, int);
34*344a7f5eSAndroid Build Coastguard Worker    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);
35*344a7f5eSAndroid Build Coastguard Worker    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);
36*344a7f5eSAndroid Build Coastguard Worker    method public void systemReady();
37*344a7f5eSAndroid Build Coastguard Worker    field public static final String ACTION_CLEAR_DNS_CACHE = "android.net.action.CLEAR_DNS_CACHE";
38*344a7f5eSAndroid Build Coastguard Worker    field public static final String ACTION_PROMPT_LOST_VALIDATION = "android.net.action.PROMPT_LOST_VALIDATION";
39*344a7f5eSAndroid Build Coastguard Worker    field public static final String ACTION_PROMPT_PARTIAL_CONNECTIVITY = "android.net.action.PROMPT_PARTIAL_CONNECTIVITY";
40*344a7f5eSAndroid Build Coastguard Worker    field public static final String ACTION_PROMPT_UNVALIDATED = "android.net.action.PROMPT_UNVALIDATED";
41*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_METERED_REASON_ADMIN_DISABLED = 262144; // 0x40000
42*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_METERED_REASON_DATA_SAVER = 65536; // 0x10000
43*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_METERED_REASON_MASK = -65536; // 0xffff0000
44*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_METERED_REASON_USER_RESTRICTED = 131072; // 0x20000
45*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_REASON_APP_STANDBY = 4; // 0x4
46*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_REASON_BATTERY_SAVER = 1; // 0x1
47*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_REASON_DOZE = 2; // 0x2
48*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_REASON_LOCKDOWN_VPN = 16; // 0x10
49*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_REASON_LOW_POWER_STANDBY = 32; // 0x20
50*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_REASON_NONE = 0; // 0x0
51*344a7f5eSAndroid Build Coastguard Worker    field public static final int BLOCKED_REASON_RESTRICTED_MODE = 8; // 0x8
52*344a7f5eSAndroid Build Coastguard Worker    field public static final int FIREWALL_CHAIN_DOZABLE = 1; // 0x1
53*344a7f5eSAndroid Build Coastguard Worker    field public static final int FIREWALL_CHAIN_LOW_POWER_STANDBY = 5; // 0x5
54*344a7f5eSAndroid Build Coastguard Worker    field public static final int FIREWALL_CHAIN_POWERSAVE = 3; // 0x3
55*344a7f5eSAndroid Build Coastguard Worker    field public static final int FIREWALL_CHAIN_RESTRICTED = 4; // 0x4
56*344a7f5eSAndroid Build Coastguard Worker    field public static final int FIREWALL_CHAIN_STANDBY = 2; // 0x2
57*344a7f5eSAndroid Build Coastguard Worker    field public static final int FIREWALL_RULE_ALLOW = 1; // 0x1
58*344a7f5eSAndroid Build Coastguard Worker    field public static final int FIREWALL_RULE_DEFAULT = 0; // 0x0
59*344a7f5eSAndroid Build Coastguard Worker    field public static final int FIREWALL_RULE_DENY = 2; // 0x2
60*344a7f5eSAndroid Build Coastguard Worker    field public static final int PROFILE_NETWORK_PREFERENCE_DEFAULT = 0; // 0x0
61*344a7f5eSAndroid Build Coastguard Worker    field public static final int PROFILE_NETWORK_PREFERENCE_ENTERPRISE = 1; // 0x1
62*344a7f5eSAndroid Build Coastguard Worker    field public static final int PROFILE_NETWORK_PREFERENCE_ENTERPRISE_NO_FALLBACK = 2; // 0x2
63*344a7f5eSAndroid Build Coastguard Worker  }
64*344a7f5eSAndroid Build Coastguard Worker
65*344a7f5eSAndroid Build Coastguard Worker  public static class ConnectivityManager.NetworkCallback {
66*344a7f5eSAndroid Build Coastguard Worker    method public void onBlockedStatusChanged(@NonNull android.net.Network, int);
67*344a7f5eSAndroid Build Coastguard Worker  }
68*344a7f5eSAndroid Build Coastguard Worker
69*344a7f5eSAndroid Build Coastguard Worker  public class ConnectivitySettingsManager {
70*344a7f5eSAndroid Build Coastguard Worker    method public static void clearGlobalProxy(@NonNull android.content.Context);
71*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public static String getCaptivePortalHttpUrl(@NonNull android.content.Context);
72*344a7f5eSAndroid Build Coastguard Worker    method public static int getCaptivePortalMode(@NonNull android.content.Context, int);
73*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static java.time.Duration getConnectivityKeepPendingIntentDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
74*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static android.util.Range<java.lang.Integer> getDnsResolverSampleRanges(@NonNull android.content.Context);
75*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static java.time.Duration getDnsResolverSampleValidityDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
76*344a7f5eSAndroid Build Coastguard Worker    method public static int getDnsResolverSuccessThresholdPercent(@NonNull android.content.Context, int);
77*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public static android.net.ProxyInfo getGlobalProxy(@NonNull android.content.Context);
78*344a7f5eSAndroid Build Coastguard Worker    method public static long getIngressRateLimitInBytesPerSecond(@NonNull android.content.Context);
79*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static java.time.Duration getMobileDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration);
80*344a7f5eSAndroid Build Coastguard Worker    method public static boolean getMobileDataAlwaysOn(@NonNull android.content.Context, boolean);
81*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static java.util.Set<java.lang.Integer> getMobileDataPreferredUids(@NonNull android.content.Context);
82*344a7f5eSAndroid Build Coastguard Worker    method public static int getNetworkAvoidBadWifi(@NonNull android.content.Context);
83*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public static String getNetworkMeteredMultipathPreference(@NonNull android.content.Context);
84*344a7f5eSAndroid Build Coastguard Worker    method public static int getNetworkSwitchNotificationMaximumDailyCount(@NonNull android.content.Context, int);
85*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static java.time.Duration getNetworkSwitchNotificationRateDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
86*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static String getPrivateDnsDefaultMode(@NonNull android.content.Context);
87*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public static String getPrivateDnsHostname(@NonNull android.content.Context);
88*344a7f5eSAndroid Build Coastguard Worker    method public static int getPrivateDnsMode(@NonNull android.content.Context);
89*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static java.util.Set<java.lang.Integer> getUidsAllowedOnRestrictedNetworks(@NonNull android.content.Context);
90*344a7f5eSAndroid Build Coastguard Worker    method public static boolean getWifiAlwaysRequested(@NonNull android.content.Context, boolean);
91*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public static java.time.Duration getWifiDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration);
92*344a7f5eSAndroid Build Coastguard Worker    method public static void setCaptivePortalHttpUrl(@NonNull android.content.Context, @Nullable String);
93*344a7f5eSAndroid Build Coastguard Worker    method public static void setCaptivePortalMode(@NonNull android.content.Context, int);
94*344a7f5eSAndroid Build Coastguard Worker    method public static void setConnectivityKeepPendingIntentDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
95*344a7f5eSAndroid Build Coastguard Worker    method public static void setDnsResolverSampleRanges(@NonNull android.content.Context, @NonNull android.util.Range<java.lang.Integer>);
96*344a7f5eSAndroid Build Coastguard Worker    method public static void setDnsResolverSampleValidityDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
97*344a7f5eSAndroid Build Coastguard Worker    method public static void setDnsResolverSuccessThresholdPercent(@NonNull android.content.Context, @IntRange(from=0, to=100) int);
98*344a7f5eSAndroid Build Coastguard Worker    method public static void setGlobalProxy(@NonNull android.content.Context, @NonNull android.net.ProxyInfo);
99*344a7f5eSAndroid Build Coastguard Worker    method public static void setIngressRateLimitInBytesPerSecond(@NonNull android.content.Context, @IntRange(from=-1L, to=4294967295L) long);
100*344a7f5eSAndroid Build Coastguard Worker    method public static void setMobileDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration);
101*344a7f5eSAndroid Build Coastguard Worker    method public static void setMobileDataAlwaysOn(@NonNull android.content.Context, boolean);
102*344a7f5eSAndroid Build Coastguard Worker    method public static void setMobileDataPreferredUids(@NonNull android.content.Context, @NonNull java.util.Set<java.lang.Integer>);
103*344a7f5eSAndroid Build Coastguard Worker    method public static void setNetworkAvoidBadWifi(@NonNull android.content.Context, int);
104*344a7f5eSAndroid Build Coastguard Worker    method public static void setNetworkMeteredMultipathPreference(@NonNull android.content.Context, @NonNull String);
105*344a7f5eSAndroid Build Coastguard Worker    method public static void setNetworkSwitchNotificationMaximumDailyCount(@NonNull android.content.Context, @IntRange(from=0) int);
106*344a7f5eSAndroid Build Coastguard Worker    method public static void setNetworkSwitchNotificationRateDuration(@NonNull android.content.Context, @NonNull java.time.Duration);
107*344a7f5eSAndroid Build Coastguard Worker    method public static void setPrivateDnsDefaultMode(@NonNull android.content.Context, @NonNull int);
108*344a7f5eSAndroid Build Coastguard Worker    method public static void setPrivateDnsHostname(@NonNull android.content.Context, @Nullable String);
109*344a7f5eSAndroid Build Coastguard Worker    method public static void setPrivateDnsMode(@NonNull android.content.Context, int);
110*344a7f5eSAndroid Build Coastguard Worker    method public static void setUidsAllowedOnRestrictedNetworks(@NonNull android.content.Context, @NonNull java.util.Set<java.lang.Integer>);
111*344a7f5eSAndroid Build Coastguard Worker    method public static void setWifiAlwaysRequested(@NonNull android.content.Context, boolean);
112*344a7f5eSAndroid Build Coastguard Worker    method public static void setWifiDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration);
113*344a7f5eSAndroid Build Coastguard Worker    field public static final int CAPTIVE_PORTAL_MODE_AVOID = 2; // 0x2
114*344a7f5eSAndroid Build Coastguard Worker    field public static final int CAPTIVE_PORTAL_MODE_IGNORE = 0; // 0x0
115*344a7f5eSAndroid Build Coastguard Worker    field public static final int CAPTIVE_PORTAL_MODE_PROMPT = 1; // 0x1
116*344a7f5eSAndroid Build Coastguard Worker    field public static final int NETWORK_AVOID_BAD_WIFI_AVOID = 2; // 0x2
117*344a7f5eSAndroid Build Coastguard Worker    field public static final int NETWORK_AVOID_BAD_WIFI_IGNORE = 0; // 0x0
118*344a7f5eSAndroid Build Coastguard Worker    field public static final int NETWORK_AVOID_BAD_WIFI_PROMPT = 1; // 0x1
119*344a7f5eSAndroid Build Coastguard Worker    field public static final int PRIVATE_DNS_MODE_OFF = 1; // 0x1
120*344a7f5eSAndroid Build Coastguard Worker    field public static final int PRIVATE_DNS_MODE_OPPORTUNISTIC = 2; // 0x2
121*344a7f5eSAndroid Build Coastguard Worker    field public static final int PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = 3; // 0x3
122*344a7f5eSAndroid Build Coastguard Worker  }
123*344a7f5eSAndroid Build Coastguard Worker
124*344a7f5eSAndroid Build Coastguard Worker  public final class DhcpOption implements android.os.Parcelable {
125*344a7f5eSAndroid Build Coastguard Worker    ctor public DhcpOption(byte, @Nullable byte[]);
126*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
127*344a7f5eSAndroid Build Coastguard Worker    method public byte getType();
128*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public byte[] getValue();
129*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(@NonNull android.os.Parcel, int);
130*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.net.DhcpOption> CREATOR;
131*344a7f5eSAndroid Build Coastguard Worker  }
132*344a7f5eSAndroid Build Coastguard Worker
133*344a7f5eSAndroid Build Coastguard Worker  public final class NetworkAgentConfig implements android.os.Parcelable {
134*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public String getSubscriberId();
135*344a7f5eSAndroid Build Coastguard Worker    method public boolean isBypassableVpn();
136*344a7f5eSAndroid Build Coastguard Worker    method public boolean isVpnValidationRequired();
137*344a7f5eSAndroid Build Coastguard Worker  }
138*344a7f5eSAndroid Build Coastguard Worker
139*344a7f5eSAndroid Build Coastguard Worker  public static final class NetworkAgentConfig.Builder {
140*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.NetworkAgentConfig.Builder setBypassableVpn(boolean);
141*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.NetworkAgentConfig.Builder setLocalRoutesExcludedForVpn(boolean);
142*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.NetworkAgentConfig.Builder setSubscriberId(@Nullable String);
143*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.NetworkAgentConfig.Builder setVpnRequiresValidation(boolean);
144*344a7f5eSAndroid Build Coastguard Worker  }
145*344a7f5eSAndroid Build Coastguard Worker
146*344a7f5eSAndroid Build Coastguard Worker  public final class NetworkCapabilities implements android.os.Parcelable {
147*344a7f5eSAndroid Build Coastguard Worker    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public java.util.Set<java.lang.Integer> getAllowedUids();
148*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public java.util.Set<android.util.Range<java.lang.Integer>> getUids();
149*344a7f5eSAndroid Build Coastguard Worker    method public boolean hasForbiddenCapability(int);
150*344a7f5eSAndroid Build Coastguard Worker    field public static final long REDACT_ALL = -1L; // 0xffffffffffffffffL
151*344a7f5eSAndroid Build Coastguard Worker    field public static final long REDACT_FOR_ACCESS_FINE_LOCATION = 1L; // 0x1L
152*344a7f5eSAndroid Build Coastguard Worker    field public static final long REDACT_FOR_LOCAL_MAC_ADDRESS = 2L; // 0x2L
153*344a7f5eSAndroid Build Coastguard Worker    field public static final long REDACT_FOR_NETWORK_SETTINGS = 4L; // 0x4L
154*344a7f5eSAndroid Build Coastguard Worker    field public static final long REDACT_NONE = 0L; // 0x0L
155*344a7f5eSAndroid Build Coastguard Worker    field public static final int TRANSPORT_TEST = 7; // 0x7
156*344a7f5eSAndroid Build Coastguard Worker  }
157*344a7f5eSAndroid Build Coastguard Worker
158*344a7f5eSAndroid Build Coastguard Worker  public static final class NetworkCapabilities.Builder {
159*344a7f5eSAndroid Build Coastguard Worker    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setAllowedUids(@NonNull java.util.Set<java.lang.Integer>);
160*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.NetworkCapabilities.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>);
161*344a7f5eSAndroid Build Coastguard Worker  }
162*344a7f5eSAndroid Build Coastguard Worker
163*344a7f5eSAndroid Build Coastguard Worker  public class NetworkRequest implements android.os.Parcelable {
164*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public int[] getEnterpriseIds();
165*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public int[] getForbiddenCapabilities();
166*344a7f5eSAndroid Build Coastguard Worker    method public boolean hasEnterpriseId(int);
167*344a7f5eSAndroid Build Coastguard Worker    method public boolean hasForbiddenCapability(int);
168*344a7f5eSAndroid Build Coastguard Worker  }
169*344a7f5eSAndroid Build Coastguard Worker
170*344a7f5eSAndroid Build Coastguard Worker  public static class NetworkRequest.Builder {
171*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.NetworkRequest.Builder addForbiddenCapability(int);
172*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.NetworkRequest.Builder removeForbiddenCapability(int);
173*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.NetworkRequest.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>);
174*344a7f5eSAndroid Build Coastguard Worker  }
175*344a7f5eSAndroid Build Coastguard Worker
176*344a7f5eSAndroid Build Coastguard Worker  public final class ProfileNetworkPreference implements android.os.Parcelable {
177*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
178*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public int[] getExcludedUids();
179*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public int[] getIncludedUids();
180*344a7f5eSAndroid Build Coastguard Worker    method public int getPreference();
181*344a7f5eSAndroid Build Coastguard Worker    method public int getPreferenceEnterpriseId();
182*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(@NonNull android.os.Parcel, int);
183*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.net.ProfileNetworkPreference> CREATOR;
184*344a7f5eSAndroid Build Coastguard Worker  }
185*344a7f5eSAndroid Build Coastguard Worker
186*344a7f5eSAndroid Build Coastguard Worker  public static final class ProfileNetworkPreference.Builder {
187*344a7f5eSAndroid Build Coastguard Worker    ctor public ProfileNetworkPreference.Builder();
188*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.ProfileNetworkPreference build();
189*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.ProfileNetworkPreference.Builder setExcludedUids(@NonNull int[]);
190*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.ProfileNetworkPreference.Builder setIncludedUids(@NonNull int[]);
191*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.ProfileNetworkPreference.Builder setPreference(int);
192*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.ProfileNetworkPreference.Builder setPreferenceEnterpriseId(int);
193*344a7f5eSAndroid Build Coastguard Worker  }
194*344a7f5eSAndroid Build Coastguard Worker
195*344a7f5eSAndroid Build Coastguard Worker  public final class TestNetworkInterface implements android.os.Parcelable {
196*344a7f5eSAndroid Build Coastguard Worker    ctor public TestNetworkInterface(@NonNull android.os.ParcelFileDescriptor, @NonNull String);
197*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
198*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.os.ParcelFileDescriptor getFileDescriptor();
199*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public String getInterfaceName();
200*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(@NonNull android.os.Parcel, int);
201*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkInterface> CREATOR;
202*344a7f5eSAndroid Build Coastguard Worker  }
203*344a7f5eSAndroid Build Coastguard Worker
204*344a7f5eSAndroid Build Coastguard Worker  public class TestNetworkManager {
205*344a7f5eSAndroid Build Coastguard Worker    method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTapInterface();
206*344a7f5eSAndroid Build Coastguard Worker    method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>);
207*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder);
208*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void teardownTestNetwork(@NonNull android.net.Network);
209*344a7f5eSAndroid Build Coastguard Worker    field public static final String TEST_TAP_PREFIX = "testtap";
210*344a7f5eSAndroid Build Coastguard Worker  }
211*344a7f5eSAndroid Build Coastguard Worker
212*344a7f5eSAndroid Build Coastguard Worker  public final class TestNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
213*344a7f5eSAndroid Build Coastguard Worker    ctor public TestNetworkSpecifier(@NonNull String);
214*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
215*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public String getInterfaceName();
216*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(@NonNull android.os.Parcel, int);
217*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkSpecifier> CREATOR;
218*344a7f5eSAndroid Build Coastguard Worker  }
219*344a7f5eSAndroid Build Coastguard Worker
220*344a7f5eSAndroid Build Coastguard Worker  public interface TransportInfo {
221*344a7f5eSAndroid Build Coastguard Worker    method public default long getApplicableRedactions();
222*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public default android.net.TransportInfo makeCopy(long);
223*344a7f5eSAndroid Build Coastguard Worker  }
224*344a7f5eSAndroid Build Coastguard Worker
225*344a7f5eSAndroid Build Coastguard Worker  public final class VpnTransportInfo implements android.os.Parcelable android.net.TransportInfo {
226*344a7f5eSAndroid Build Coastguard Worker    ctor public VpnTransportInfo(int, @Nullable String);
227*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
228*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public String getSessionId();
229*344a7f5eSAndroid Build Coastguard Worker    method public int getType();
230*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.net.VpnTransportInfo makeCopy(long);
231*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(@NonNull android.os.Parcel, int);
232*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.net.VpnTransportInfo> CREATOR;
233*344a7f5eSAndroid Build Coastguard Worker  }
234*344a7f5eSAndroid Build Coastguard Worker
235*344a7f5eSAndroid Build Coastguard Worker}
236*344a7f5eSAndroid Build Coastguard Worker
237