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 { |
markchien | e46042b | 2022-03-02 18:07:35 +0800 | [diff] [blame] | 9 | 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 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void addUidToMeteredNetworkDenyList(int); |
Chiachang Wang | f9294e7 | 2021-03-18 09:44:34 +0800 | [diff] [blame] | 11 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void factoryReset(); |
Aaron Huang | da103b3 | 2021-04-17 13:46:25 +0800 | [diff] [blame] | 12 | 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 Wang | f9294e7 | 2021-03-18 09:44:34 +0800 | [diff] [blame] | 13 | method @Nullable public android.net.ProxyInfo getGlobalProxy(); |
lucaslin | 5cdbcfb | 2021-03-12 00:46:33 +0800 | [diff] [blame] | 14 | method @NonNull public static android.util.Range<java.lang.Integer> getIpSecNetIdRange(); |
lucaslin | d2b0613 | 2022-03-02 10:56:57 +0800 | [diff] [blame] | 15 | 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 | 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); |
Chiachang Wang | 9075ae3 | 2021-04-20 15:41:24 +0800 | [diff] [blame] | 17 | 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 VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 18 | 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); |
markchien | e46042b | 2022-03-02 18:07:35 +0800 | [diff] [blame] | 19 | 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 | method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void removeUidFromMeteredNetworkDenyList(int); |
markchien | 00a0bed | 2022-01-13 23:46:13 +0800 | [diff] [blame] | 21 | 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[]); |
junyulai | 8c8ac36 | 2021-04-15 00:39:49 +0800 | [diff] [blame] | 22 | 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); |
lucaslin | 29278ee | 2021-03-22 11:51:27 +0800 | [diff] [blame] | 23 | method @Deprecated public boolean requestRouteToHostAddress(int, java.net.InetAddress); |
Chiachang Wang | f9294e7 | 2021-03-18 09:44:34 +0800 | [diff] [blame] | 24 | 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 | 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 | 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); |
markchien | 98a6f95 | 2022-01-13 23:43:53 +0800 | [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 setFirewallChainEnabled(int, boolean); |
Chiachang Wang | f9294e7 | 2021-03-18 09:44:34 +0800 | [diff] [blame] | 28 | 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] | 29 | 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 Sasindran | e7aee27 | 2021-11-24 20:26:55 -0800 | [diff] [blame] | 30 | method @Deprecated @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setProfileNetworkPreference(@NonNull android.os.UserHandle, int, @Nullable java.util.concurrent.Executor, @Nullable Runnable); |
| 31 | 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); |
lucaslin | 29278ee | 2021-03-22 11:51:27 +0800 | [diff] [blame] | 32 | 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>>); |
markchien | 4b00f76 | 2022-03-22 16:29:56 +0800 | [diff] [blame] | 33 | 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); |
Tommy Webb | 9e72cc8 | 2023-02-20 14:10:55 -0500 | [diff] [blame^] | 34 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void setUidsAllowedTransports(@NonNull int[], @NonNull long[]); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 35 | 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] | 36 | 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] | 37 | method public void systemReady(); |
paulhu | b49c842 | 2021-04-07 16:18:13 +0800 | [diff] [blame] | 38 | 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] | 39 | field public static final String ACTION_PROMPT_LOST_VALIDATION = "android.net.action.PROMPT_LOST_VALIDATION"; |
| 40 | field public static final String ACTION_PROMPT_PARTIAL_CONNECTIVITY = "android.net.action.PROMPT_PARTIAL_CONNECTIVITY"; |
| 41 | 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] | 42 | field public static final int BLOCKED_METERED_REASON_ADMIN_DISABLED = 262144; // 0x40000 |
| 43 | field public static final int BLOCKED_METERED_REASON_DATA_SAVER = 65536; // 0x10000 |
Lorenzo Colitti | 8ad5812 | 2021-03-18 00:54:57 +0900 | [diff] [blame] | 44 | field public static final int BLOCKED_METERED_REASON_MASK = -65536; // 0xffff0000 |
Sudheer Shanka | f1520bb | 2021-03-23 08:12:28 +0000 | [diff] [blame] | 45 | field public static final int BLOCKED_METERED_REASON_USER_RESTRICTED = 131072; // 0x20000 |
| 46 | field public static final int BLOCKED_REASON_APP_STANDBY = 4; // 0x4 |
| 47 | field public static final int BLOCKED_REASON_BATTERY_SAVER = 1; // 0x1 |
| 48 | field public static final int BLOCKED_REASON_DOZE = 2; // 0x2 |
Lorenzo Colitti | 8ad5812 | 2021-03-18 00:54:57 +0900 | [diff] [blame] | 49 | field public static final int BLOCKED_REASON_LOCKDOWN_VPN = 16; // 0x10 |
Robert Horvath | 2dac948 | 2021-11-15 15:49:37 +0100 | [diff] [blame] | 50 | field public static final int BLOCKED_REASON_LOW_POWER_STANDBY = 32; // 0x20 |
Sudheer Shanka | f1520bb | 2021-03-23 08:12:28 +0000 | [diff] [blame] | 51 | field public static final int BLOCKED_REASON_NONE = 0; // 0x0 |
| 52 | field public static final int BLOCKED_REASON_RESTRICTED_MODE = 8; // 0x8 |
markchien | e1561fa | 2021-12-09 22:00:56 +0800 | [diff] [blame] | 53 | field public static final int FIREWALL_CHAIN_DOZABLE = 1; // 0x1 |
Robert Horvath | 34cba14 | 2022-01-27 19:52:43 +0100 | [diff] [blame] | 54 | field public static final int FIREWALL_CHAIN_LOW_POWER_STANDBY = 5; // 0x5 |
markchien | e1561fa | 2021-12-09 22:00:56 +0800 | [diff] [blame] | 55 | field public static final int FIREWALL_CHAIN_POWERSAVE = 3; // 0x3 |
| 56 | field public static final int FIREWALL_CHAIN_RESTRICTED = 4; // 0x4 |
| 57 | field public static final int FIREWALL_CHAIN_STANDBY = 2; // 0x2 |
markchien | 4b00f76 | 2022-03-22 16:29:56 +0800 | [diff] [blame] | 58 | field public static final int FIREWALL_RULE_ALLOW = 1; // 0x1 |
| 59 | field public static final int FIREWALL_RULE_DEFAULT = 0; // 0x0 |
| 60 | field public static final int FIREWALL_RULE_DENY = 2; // 0x2 |
Chalard Jean | bef6b09 | 2021-03-17 14:33:24 +0900 | [diff] [blame] | 61 | field public static final int PROFILE_NETWORK_PREFERENCE_DEFAULT = 0; // 0x0 |
| 62 | field public static final int PROFILE_NETWORK_PREFERENCE_ENTERPRISE = 1; // 0x1 |
Sooraj Sasindran | 06baf4c | 2021-11-29 12:21:09 -0800 | [diff] [blame] | 63 | field public static final int PROFILE_NETWORK_PREFERENCE_ENTERPRISE_NO_FALLBACK = 2; // 0x2 |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 64 | } |
| 65 | |
Lorenzo Colitti | 8ad5812 | 2021-03-18 00:54:57 +0900 | [diff] [blame] | 66 | public static class ConnectivityManager.NetworkCallback { |
| 67 | method public void onBlockedStatusChanged(@NonNull android.net.Network, int); |
| 68 | } |
| 69 | |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 70 | public class ConnectivitySettingsManager { |
| 71 | method public static void clearGlobalProxy(@NonNull android.content.Context); |
| 72 | method @Nullable public static String getCaptivePortalHttpUrl(@NonNull android.content.Context); |
| 73 | method public static int getCaptivePortalMode(@NonNull android.content.Context, int); |
| 74 | method @NonNull public static java.time.Duration getConnectivityKeepPendingIntentDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 75 | method @NonNull public static android.util.Range<java.lang.Integer> getDnsResolverSampleRanges(@NonNull android.content.Context); |
| 76 | method @NonNull public static java.time.Duration getDnsResolverSampleValidityDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 77 | method public static int getDnsResolverSuccessThresholdPercent(@NonNull android.content.Context, int); |
| 78 | method @Nullable public static android.net.ProxyInfo getGlobalProxy(@NonNull android.content.Context); |
Patrick Rohr | a208436 | 2022-01-03 15:55:52 +0100 | [diff] [blame] | 79 | method public static long getIngressRateLimitInBytesPerSecond(@NonNull android.content.Context); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 80 | method @NonNull public static java.time.Duration getMobileDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 81 | method public static boolean getMobileDataAlwaysOn(@NonNull android.content.Context, boolean); |
paulhu | 344c116 | 2021-05-11 09:42:50 +0800 | [diff] [blame] | 82 | method @NonNull public static java.util.Set<java.lang.Integer> getMobileDataPreferredUids(@NonNull android.content.Context); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 83 | method public static int getNetworkAvoidBadWifi(@NonNull android.content.Context); |
| 84 | method @Nullable public static String getNetworkMeteredMultipathPreference(@NonNull android.content.Context); |
| 85 | method public static int getNetworkSwitchNotificationMaximumDailyCount(@NonNull android.content.Context, int); |
| 86 | method @NonNull public static java.time.Duration getNetworkSwitchNotificationRateDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 87 | method @NonNull public static String getPrivateDnsDefaultMode(@NonNull android.content.Context); |
| 88 | method @Nullable public static String getPrivateDnsHostname(@NonNull android.content.Context); |
lucaslin | 57f9ba8 | 2021-04-23 21:03:39 +0800 | [diff] [blame] | 89 | method public static int getPrivateDnsMode(@NonNull android.content.Context); |
paulhu | 91e7806 | 2021-05-26 16:16:57 +0800 | [diff] [blame] | 90 | method @NonNull public static java.util.Set<java.lang.Integer> getUidsAllowedOnRestrictedNetworks(@NonNull android.content.Context); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 91 | method public static boolean getWifiAlwaysRequested(@NonNull android.content.Context, boolean); |
| 92 | method @NonNull public static java.time.Duration getWifiDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 93 | method public static void setCaptivePortalHttpUrl(@NonNull android.content.Context, @Nullable String); |
| 94 | method public static void setCaptivePortalMode(@NonNull android.content.Context, int); |
| 95 | method public static void setConnectivityKeepPendingIntentDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 96 | method public static void setDnsResolverSampleRanges(@NonNull android.content.Context, @NonNull android.util.Range<java.lang.Integer>); |
| 97 | method public static void setDnsResolverSampleValidityDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 98 | method public static void setDnsResolverSuccessThresholdPercent(@NonNull android.content.Context, @IntRange(from=0, to=100) int); |
| 99 | method public static void setGlobalProxy(@NonNull android.content.Context, @NonNull android.net.ProxyInfo); |
Patrick Rohr | ca7e578 | 2022-02-18 10:34:20 +0100 | [diff] [blame] | 100 | method public static void setIngressRateLimitInBytesPerSecond(@NonNull android.content.Context, @IntRange(from=-1L, to=4294967295L) long); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 101 | method public static void setMobileDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 102 | method public static void setMobileDataAlwaysOn(@NonNull android.content.Context, boolean); |
paulhu | 344c116 | 2021-05-11 09:42:50 +0800 | [diff] [blame] | 103 | method public static void setMobileDataPreferredUids(@NonNull android.content.Context, @NonNull java.util.Set<java.lang.Integer>); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 104 | method public static void setNetworkAvoidBadWifi(@NonNull android.content.Context, int); |
| 105 | method public static void setNetworkMeteredMultipathPreference(@NonNull android.content.Context, @NonNull String); |
| 106 | method public static void setNetworkSwitchNotificationMaximumDailyCount(@NonNull android.content.Context, @IntRange(from=0) int); |
| 107 | method public static void setNetworkSwitchNotificationRateDuration(@NonNull android.content.Context, @NonNull java.time.Duration); |
lucaslin | 57f9ba8 | 2021-04-23 21:03:39 +0800 | [diff] [blame] | 108 | method public static void setPrivateDnsDefaultMode(@NonNull android.content.Context, @NonNull int); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 109 | method public static void setPrivateDnsHostname(@NonNull android.content.Context, @Nullable String); |
lucaslin | 57f9ba8 | 2021-04-23 21:03:39 +0800 | [diff] [blame] | 110 | method public static void setPrivateDnsMode(@NonNull android.content.Context, int); |
paulhu | 91e7806 | 2021-05-26 16:16:57 +0800 | [diff] [blame] | 111 | method public static void setUidsAllowedOnRestrictedNetworks(@NonNull android.content.Context, @NonNull java.util.Set<java.lang.Integer>); |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 112 | method public static void setWifiAlwaysRequested(@NonNull android.content.Context, boolean); |
| 113 | method public static void setWifiDataActivityTimeout(@NonNull android.content.Context, @NonNull java.time.Duration); |
| 114 | field public static final int CAPTIVE_PORTAL_MODE_AVOID = 2; // 0x2 |
| 115 | field public static final int CAPTIVE_PORTAL_MODE_IGNORE = 0; // 0x0 |
| 116 | field public static final int CAPTIVE_PORTAL_MODE_PROMPT = 1; // 0x1 |
| 117 | field public static final int NETWORK_AVOID_BAD_WIFI_AVOID = 2; // 0x2 |
| 118 | field public static final int NETWORK_AVOID_BAD_WIFI_IGNORE = 0; // 0x0 |
| 119 | field public static final int NETWORK_AVOID_BAD_WIFI_PROMPT = 1; // 0x1 |
lucaslin | 57f9ba8 | 2021-04-23 21:03:39 +0800 | [diff] [blame] | 120 | field public static final int PRIVATE_DNS_MODE_OFF = 1; // 0x1 |
| 121 | field public static final int PRIVATE_DNS_MODE_OPPORTUNISTIC = 2; // 0x2 |
| 122 | field public static final int PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = 3; // 0x3 |
paulhu | 9443095 | 2021-03-23 00:24:50 +0800 | [diff] [blame] | 123 | } |
| 124 | |
Mingguang Xu | 2d87c61 | 2021-10-29 00:18:55 -0700 | [diff] [blame] | 125 | public final class DhcpOption implements android.os.Parcelable { |
| 126 | ctor public DhcpOption(byte, @Nullable byte[]); |
| 127 | method public int describeContents(); |
| 128 | method public byte getType(); |
| 129 | method @Nullable public byte[] getValue(); |
| 130 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 131 | field @NonNull public static final android.os.Parcelable.Creator<android.net.DhcpOption> CREATOR; |
| 132 | } |
| 133 | |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 134 | public final class NetworkAgentConfig implements android.os.Parcelable { |
| 135 | method @Nullable public String getSubscriberId(); |
lucaslin | 0e345e9 | 2021-03-22 15:07:41 +0800 | [diff] [blame] | 136 | method public boolean isBypassableVpn(); |
Chiachang Wang | 7ec6ae7 | 2022-02-18 13:15:13 +0800 | [diff] [blame] | 137 | method public boolean isVpnValidationRequired(); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | public static final class NetworkAgentConfig.Builder { |
lucaslin | 0e345e9 | 2021-03-22 15:07:41 +0800 | [diff] [blame] | 141 | method @NonNull public android.net.NetworkAgentConfig.Builder setBypassableVpn(boolean); |
Chiachang Wang | f890874 | 2022-02-08 15:45:11 +0800 | [diff] [blame] | 142 | method @NonNull public android.net.NetworkAgentConfig.Builder setLocalRoutesExcludedForVpn(boolean); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 143 | method @NonNull public android.net.NetworkAgentConfig.Builder setSubscriberId(@Nullable String); |
Chiachang Wang | 865511a | 2022-01-27 17:08:41 +0800 | [diff] [blame] | 144 | method @NonNull public android.net.NetworkAgentConfig.Builder setVpnRequiresValidation(boolean); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | public final class NetworkCapabilities implements android.os.Parcelable { |
Chalard Jean | 7d72b41 | 2022-02-25 16:12:12 +0900 | [diff] [blame] | 148 | method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public java.util.Set<java.lang.Integer> getAllowedUids(); |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 149 | method @Nullable public java.util.Set<android.util.Range<java.lang.Integer>> getUids(); |
Lorenzo Colitti | 395fafb | 2021-04-27 10:37:09 +0900 | [diff] [blame] | 150 | method public boolean hasForbiddenCapability(int); |
Roshan Pius | e2d2838 | 2021-02-23 08:47:39 -0800 | [diff] [blame] | 151 | field public static final long REDACT_ALL = -1L; // 0xffffffffffffffffL |
| 152 | field public static final long REDACT_FOR_ACCESS_FINE_LOCATION = 1L; // 0x1L |
| 153 | field public static final long REDACT_FOR_LOCAL_MAC_ADDRESS = 2L; // 0x2L |
| 154 | field public static final long REDACT_FOR_NETWORK_SETTINGS = 4L; // 0x4L |
| 155 | field public static final long REDACT_NONE = 0L; // 0x0L |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 156 | field public static final int TRANSPORT_TEST = 7; // 0x7 |
| 157 | } |
| 158 | |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 159 | public static final class NetworkCapabilities.Builder { |
Chalard Jean | 7d72b41 | 2022-02-25 16:12:12 +0900 | [diff] [blame] | 160 | method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setAllowedUids(@NonNull java.util.Set<java.lang.Integer>); |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 161 | method @NonNull public android.net.NetworkCapabilities.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>); |
| 162 | } |
| 163 | |
junyulai | b15b7db | 2021-03-16 10:24:43 +0800 | [diff] [blame] | 164 | public class NetworkRequest implements android.os.Parcelable { |
Sooraj Sasindran | 7e9b25e | 2022-01-25 14:49:29 -0800 | [diff] [blame] | 165 | method @NonNull public int[] getEnterpriseIds(); |
Lorenzo Colitti | 395fafb | 2021-04-27 10:37:09 +0900 | [diff] [blame] | 166 | method @NonNull public int[] getForbiddenCapabilities(); |
Sooraj Sasindran | 7e9b25e | 2022-01-25 14:49:29 -0800 | [diff] [blame] | 167 | method public boolean hasEnterpriseId(int); |
Lorenzo Colitti | 395fafb | 2021-04-27 10:37:09 +0900 | [diff] [blame] | 168 | method public boolean hasForbiddenCapability(int); |
junyulai | b15b7db | 2021-03-16 10:24:43 +0800 | [diff] [blame] | 169 | } |
| 170 | |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 171 | public static class NetworkRequest.Builder { |
Lorenzo Colitti | 395fafb | 2021-04-27 10:37:09 +0900 | [diff] [blame] | 172 | method @NonNull public android.net.NetworkRequest.Builder addForbiddenCapability(int); |
| 173 | method @NonNull public android.net.NetworkRequest.Builder removeForbiddenCapability(int); |
Chiachang Wang | 628cb11 | 2021-03-19 00:45:39 +0000 | [diff] [blame] | 174 | method @NonNull public android.net.NetworkRequest.Builder setUids(@Nullable java.util.Set<android.util.Range<java.lang.Integer>>); |
| 175 | } |
| 176 | |
Sooraj Sasindran | e7aee27 | 2021-11-24 20:26:55 -0800 | [diff] [blame] | 177 | public final class ProfileNetworkPreference implements android.os.Parcelable { |
| 178 | method public int describeContents(); |
Sooraj Sasindran | 4904176 | 2022-03-09 21:59:00 -0800 | [diff] [blame] | 179 | method @NonNull public int[] getExcludedUids(); |
| 180 | method @NonNull public int[] getIncludedUids(); |
Sooraj Sasindran | e7aee27 | 2021-11-24 20:26:55 -0800 | [diff] [blame] | 181 | method public int getPreference(); |
Sooraj Sasindran | f4a58dc | 2022-01-21 13:37:08 -0800 | [diff] [blame] | 182 | method public int getPreferenceEnterpriseId(); |
Sooraj Sasindran | e7aee27 | 2021-11-24 20:26:55 -0800 | [diff] [blame] | 183 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 184 | field @NonNull public static final android.os.Parcelable.Creator<android.net.ProfileNetworkPreference> CREATOR; |
| 185 | } |
| 186 | |
| 187 | public static final class ProfileNetworkPreference.Builder { |
| 188 | ctor public ProfileNetworkPreference.Builder(); |
| 189 | method @NonNull public android.net.ProfileNetworkPreference build(); |
Sooraj Sasindran | 4904176 | 2022-03-09 21:59:00 -0800 | [diff] [blame] | 190 | method @NonNull public android.net.ProfileNetworkPreference.Builder setExcludedUids(@NonNull int[]); |
| 191 | method @NonNull public android.net.ProfileNetworkPreference.Builder setIncludedUids(@NonNull int[]); |
Sooraj Sasindran | e7aee27 | 2021-11-24 20:26:55 -0800 | [diff] [blame] | 192 | method @NonNull public android.net.ProfileNetworkPreference.Builder setPreference(int); |
Sooraj Sasindran | f4a58dc | 2022-01-21 13:37:08 -0800 | [diff] [blame] | 193 | method @NonNull public android.net.ProfileNetworkPreference.Builder setPreferenceEnterpriseId(int); |
Sooraj Sasindran | e7aee27 | 2021-11-24 20:26:55 -0800 | [diff] [blame] | 194 | } |
| 195 | |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 196 | public final class TestNetworkInterface implements android.os.Parcelable { |
| 197 | ctor public TestNetworkInterface(@NonNull android.os.ParcelFileDescriptor, @NonNull String); |
| 198 | method public int describeContents(); |
| 199 | method @NonNull public android.os.ParcelFileDescriptor getFileDescriptor(); |
| 200 | method @NonNull public String getInterfaceName(); |
| 201 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 202 | field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkInterface> CREATOR; |
| 203 | } |
| 204 | |
| 205 | public class TestNetworkManager { |
Remi NGUYEN VAN | c5174c3 | 2021-04-08 16:08:46 +0900 | [diff] [blame] | 206 | method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTapInterface(); |
| 207 | method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public android.net.TestNetworkInterface createTunInterface(@NonNull java.util.Collection<android.net.LinkAddress>); |
| 208 | method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void setupTestNetwork(@NonNull String, @NonNull android.os.IBinder); |
| 209 | method @RequiresPermission(android.Manifest.permission.MANAGE_TEST_NETWORKS) public void teardownTestNetwork(@NonNull android.net.Network); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 210 | field public static final String TEST_TAP_PREFIX = "testtap"; |
| 211 | } |
| 212 | |
Remi NGUYEN VAN | ea33ac9 | 2021-02-04 14:20:19 +0900 | [diff] [blame] | 213 | public final class TestNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable { |
| 214 | ctor public TestNetworkSpecifier(@NonNull String); |
| 215 | method public int describeContents(); |
| 216 | method @Nullable public String getInterfaceName(); |
| 217 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 218 | field @NonNull public static final android.os.Parcelable.Creator<android.net.TestNetworkSpecifier> CREATOR; |
| 219 | } |
| 220 | |
Roshan Pius | e2d2838 | 2021-02-23 08:47:39 -0800 | [diff] [blame] | 221 | public interface TransportInfo { |
| 222 | method public default long getApplicableRedactions(); |
| 223 | method @NonNull public default android.net.TransportInfo makeCopy(long); |
| 224 | } |
| 225 | |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 226 | public final class VpnTransportInfo implements android.os.Parcelable android.net.TransportInfo { |
lifr | 65b9f96 | 2021-03-24 18:38:37 +0800 | [diff] [blame] | 227 | ctor public VpnTransportInfo(int, @Nullable String); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 228 | method public int describeContents(); |
Chiachang Wang | 9075ae3 | 2021-04-20 15:41:24 +0800 | [diff] [blame] | 229 | method @Nullable public String getSessionId(); |
| 230 | method public int getType(); |
lifr | 65b9f96 | 2021-03-24 18:38:37 +0800 | [diff] [blame] | 231 | method @NonNull public android.net.VpnTransportInfo makeCopy(long); |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 232 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 233 | field @NonNull public static final android.os.Parcelable.Creator<android.net.VpnTransportInfo> CREATOR; |
Remi NGUYEN VAN | f15fc7f | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 234 | } |
| 235 | |
| 236 | } |
| 237 | |