The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (c) 2008, The Android Open Source Project |
| 3 | * |
Danica Chang | 6fdd0c6 | 2010-08-11 14:54:43 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7 | * |
Danica Chang | 6fdd0c6 | 2010-08-11 14:54:43 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 9 | * |
Danica Chang | 6fdd0c6 | 2010-08-11 14:54:43 -0700 | [diff] [blame] | 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.net; |
| 18 | |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 19 | import android.app.PendingIntent; |
Jeff Vander Stoep | 0ac2c09 | 2018-07-23 10:57:53 -0700 | [diff] [blame] | 20 | import android.net.ConnectionInfo; |
Cody Kesting | 5aadb8b | 2019-12-17 12:55:28 -0800 | [diff] [blame] | 21 | import android.net.IConnectivityDiagnosticsCallback; |
Robert Greenwalt | d192dad | 2010-09-14 09:18:02 -0700 | [diff] [blame] | 22 | import android.net.LinkProperties; |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 23 | import android.net.Network; |
Lorenzo Colitti | 2dda9e0 | 2020-01-12 22:28:37 +0900 | [diff] [blame] | 24 | import android.net.NetworkAgentConfig; |
Robert Greenwalt | 7b81602 | 2014-04-18 15:25:25 -0700 | [diff] [blame] | 25 | import android.net.NetworkCapabilities; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | import android.net.NetworkInfo; |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 27 | import android.net.NetworkQuotaInfo; |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 28 | import android.net.NetworkRequest; |
Jeff Sharkey | d2a4587 | 2011-05-28 20:56:34 -0700 | [diff] [blame] | 29 | import android.net.NetworkState; |
junyulai | 7c46917 | 2019-01-16 20:23:34 +0800 | [diff] [blame] | 30 | import android.net.ISocketKeepaliveCallback; |
Jason Monk | 207900c | 2014-04-25 15:00:09 -0400 | [diff] [blame] | 31 | import android.net.ProxyInfo; |
Remi NGUYEN VAN | dc48356 | 2019-02-04 11:32:20 +0900 | [diff] [blame] | 32 | import android.os.Bundle; |
Robert Greenwalt | 42acef3 | 2009-08-12 16:08:25 -0700 | [diff] [blame] | 33 | import android.os.IBinder; |
Robert Greenwalt | 665e1ae | 2012-08-21 19:27:00 -0700 | [diff] [blame] | 34 | import android.os.Messenger; |
Chia-chi Yeh | ff3bdca | 2011-05-23 17:26:46 -0700 | [diff] [blame] | 35 | import android.os.ParcelFileDescriptor; |
Wink Saville | ab9321d | 2013-06-29 21:10:57 -0700 | [diff] [blame] | 36 | import android.os.ResultReceiver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 37 | |
Chia-chi Yeh | 2e46764 | 2011-07-04 03:23:12 -0700 | [diff] [blame] | 38 | import com.android.internal.net.LegacyVpnInfo; |
Chia-chi Yeh | 04ba25c | 2011-06-15 17:07:27 -0700 | [diff] [blame] | 39 | import com.android.internal.net.VpnConfig; |
Wenchao Tong | f5ea340 | 2015-03-04 13:26:38 -0800 | [diff] [blame] | 40 | import com.android.internal.net.VpnInfo; |
Jeff Sharkey | 82f8521 | 2012-08-24 11:17:25 -0700 | [diff] [blame] | 41 | import com.android.internal.net.VpnProfile; |
Chia-chi Yeh | 04ba25c | 2011-06-15 17:07:27 -0700 | [diff] [blame] | 42 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | /** |
| 44 | * Interface that answers queries about, and allows changing, the |
| 45 | * state of network connectivity. |
| 46 | */ |
| 47 | /** {@hide} */ |
| 48 | interface IConnectivityManager |
| 49 | { |
Paul Jensen | 31a94f4 | 2015-02-13 14:18:39 -0500 | [diff] [blame] | 50 | Network getActiveNetwork(); |
Jeff Sharkey | 1b6519b | 2016-04-28 15:33:18 -0600 | [diff] [blame] | 51 | Network getActiveNetworkForUid(int uid, boolean ignoreBlocked); |
Andrei Onea | efd37ef | 2019-02-28 14:37:50 +0000 | [diff] [blame] | 52 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 53 | NetworkInfo getActiveNetworkInfo(); |
Jeff Sharkey | 1b6519b | 2016-04-28 15:33:18 -0600 | [diff] [blame] | 54 | NetworkInfo getActiveNetworkInfoForUid(int uid, boolean ignoreBlocked); |
Artur Satayev | ee9c6e7 | 2019-11-04 15:58:52 +0000 | [diff] [blame] | 55 | @UnsupportedAppUsage(maxTargetSdk = 28) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 56 | NetworkInfo getNetworkInfo(int networkType); |
Jeff Sharkey | 1b6519b | 2016-04-28 15:33:18 -0600 | [diff] [blame] | 57 | NetworkInfo getNetworkInfoForUid(in Network network, int uid, boolean ignoreBlocked); |
Andrei Onea | efd37ef | 2019-02-28 14:37:50 +0000 | [diff] [blame] | 58 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | NetworkInfo[] getAllNetworkInfo(); |
Lorenzo Colitti | b57edc5 | 2014-08-22 17:10:50 -0700 | [diff] [blame] | 60 | Network getNetworkForType(int networkType); |
Robert Greenwalt | 73b6cbae | 2014-06-23 11:40:00 -0700 | [diff] [blame] | 61 | Network[] getAllNetworks(); |
Qingxi Li | 9c5d8b9 | 2020-01-08 12:51:49 -0800 | [diff] [blame] | 62 | NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser( |
| 63 | int userId, String callingPackageName); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 64 | |
Robert Greenwalt | 9b2886e | 2011-08-31 11:46:42 -0700 | [diff] [blame] | 65 | boolean isNetworkSupported(int networkType); |
| 66 | |
Andrei Onea | efd37ef | 2019-02-28 14:37:50 +0000 | [diff] [blame] | 67 | @UnsupportedAppUsage |
Robert Greenwalt | d192dad | 2010-09-14 09:18:02 -0700 | [diff] [blame] | 68 | LinkProperties getActiveLinkProperties(); |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 69 | LinkProperties getLinkPropertiesForType(int networkType); |
| 70 | LinkProperties getLinkProperties(in Network network); |
| 71 | |
Qingxi Li | 9c5d8b9 | 2020-01-08 12:51:49 -0800 | [diff] [blame] | 72 | NetworkCapabilities getNetworkCapabilities(in Network network, String callingPackageName); |
Robert Greenwalt | d192dad | 2010-09-14 09:18:02 -0700 | [diff] [blame] | 73 | |
Andrei Onea | efd37ef | 2019-02-28 14:37:50 +0000 | [diff] [blame] | 74 | @UnsupportedAppUsage |
Jeff Sharkey | d2a4587 | 2011-05-28 20:56:34 -0700 | [diff] [blame] | 75 | NetworkState[] getAllNetworkState(); |
| 76 | |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 77 | NetworkQuotaInfo getActiveNetworkQuotaInfo(); |
Jeff Sharkey | 9f7cbf0 | 2012-04-12 18:34:54 -0700 | [diff] [blame] | 78 | boolean isActiveNetworkMetered(); |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 79 | |
Sreeram Ramachandran | 03666c7 | 2014-07-19 23:21:46 -0700 | [diff] [blame] | 80 | boolean requestRouteToHostAddress(int networkType, in byte[] hostAddress); |
Robert Greenwalt | 585ac0f | 2010-08-27 09:24:29 -0700 | [diff] [blame] | 81 | |
markchien | 6d06f6d | 2019-12-16 20:15:20 +0800 | [diff] [blame] | 82 | @UnsupportedAppUsage(maxTargetSdk = 29, |
| 83 | publicAlternatives = "Use {@code TetheringManager#getLastTetherError} as alternative") |
Robert Greenwalt | 5a73506 | 2010-03-02 17:25:02 -0800 | [diff] [blame] | 84 | int getLastTetherError(String iface); |
Robert Greenwalt | d0e18ff | 2010-01-26 11:40:34 -0800 | [diff] [blame] | 85 | |
markchien | 6d06f6d | 2019-12-16 20:15:20 +0800 | [diff] [blame] | 86 | @UnsupportedAppUsage(maxTargetSdk = 29, |
| 87 | publicAlternatives = "Use {@code TetheringManager#getTetherableIfaces} as alternative") |
Robert Greenwalt | d0e18ff | 2010-01-26 11:40:34 -0800 | [diff] [blame] | 88 | String[] getTetherableIfaces(); |
| 89 | |
markchien | 6d06f6d | 2019-12-16 20:15:20 +0800 | [diff] [blame] | 90 | @UnsupportedAppUsage(maxTargetSdk = 29, |
| 91 | publicAlternatives = "Use {@code TetheringManager#getTetheredIfaces} as alternative") |
Robert Greenwalt | d0e18ff | 2010-01-26 11:40:34 -0800 | [diff] [blame] | 92 | String[] getTetheredIfaces(); |
Robert Greenwalt | 2a091d7 | 2010-02-11 18:18:40 -0800 | [diff] [blame] | 93 | |
markchien | 6d06f6d | 2019-12-16 20:15:20 +0800 | [diff] [blame] | 94 | @UnsupportedAppUsage(maxTargetSdk = 29, |
| 95 | publicAlternatives = "Use {@code TetheringManager#getTetheringErroredIfaces} " |
| 96 | + "as Alternative") |
Robert Greenwalt | 5a73506 | 2010-03-02 17:25:02 -0800 | [diff] [blame] | 97 | String[] getTetheringErroredIfaces(); |
| 98 | |
markchien | 6d06f6d | 2019-12-16 20:15:20 +0800 | [diff] [blame] | 99 | @UnsupportedAppUsage(maxTargetSdk = 29, |
| 100 | publicAlternatives = "Use {@code TetheringManager#getTetherableUsbRegexs} as alternative") |
Robert Greenwalt | 2a091d7 | 2010-02-11 18:18:40 -0800 | [diff] [blame] | 101 | String[] getTetherableUsbRegexs(); |
| 102 | |
markchien | 6d06f6d | 2019-12-16 20:15:20 +0800 | [diff] [blame] | 103 | @UnsupportedAppUsage(maxTargetSdk = 29, |
| 104 | publicAlternatives = "Use {@code TetheringManager#getTetherableWifiRegexs} as alternative") |
Robert Greenwalt | 2a091d7 | 2010-02-11 18:18:40 -0800 | [diff] [blame] | 105 | String[] getTetherableWifiRegexs(); |
Robert Greenwalt | 14f2ef4 | 2010-06-15 12:19:37 -0700 | [diff] [blame] | 106 | |
Artur Satayev | ee9c6e7 | 2019-11-04 15:58:52 +0000 | [diff] [blame] | 107 | @UnsupportedAppUsage(maxTargetSdk = 28) |
Robert Greenwalt | d7085fc | 2010-09-08 15:24:47 -0700 | [diff] [blame] | 108 | void reportInetCondition(int networkType, int percentage); |
Robert Greenwalt | 434203a | 2010-10-11 16:00:27 -0700 | [diff] [blame] | 109 | |
Paul Jensen | bfd17b7 | 2015-04-07 12:43:13 -0400 | [diff] [blame] | 110 | void reportNetworkConnectivity(in Network network, boolean hasConnectivity); |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 111 | |
Jason Monk | 207900c | 2014-04-25 15:00:09 -0400 | [diff] [blame] | 112 | ProxyInfo getGlobalProxy(); |
Robert Greenwalt | 434203a | 2010-10-11 16:00:27 -0700 | [diff] [blame] | 113 | |
Jason Monk | 207900c | 2014-04-25 15:00:09 -0400 | [diff] [blame] | 114 | void setGlobalProxy(in ProxyInfo p); |
Robert Greenwalt | 434203a | 2010-10-11 16:00:27 -0700 | [diff] [blame] | 115 | |
Paul Jensen | cee9b51 | 2015-05-06 07:32:40 -0400 | [diff] [blame] | 116 | ProxyInfo getProxyForNetwork(in Network nework); |
Robert Greenwalt | d55a6b4 | 2011-03-25 13:09:25 -0700 | [diff] [blame] | 117 | |
Robin Lee | 3b3dd94 | 2015-05-12 18:14:58 +0100 | [diff] [blame] | 118 | boolean prepareVpn(String oldPackage, String newPackage, int userId); |
Chia-chi Yeh | ff3bdca | 2011-05-23 17:26:46 -0700 | [diff] [blame] | 119 | |
Benedict Wong | 418017e | 2019-11-06 00:20:15 -0800 | [diff] [blame] | 120 | void setVpnPackageAuthorization(String packageName, int userId, int vpnType); |
Jeff Davidson | 0554260 | 2014-08-11 14:07:27 -0700 | [diff] [blame] | 121 | |
Chia-chi Yeh | 04ba25c | 2011-06-15 17:07:27 -0700 | [diff] [blame] | 122 | ParcelFileDescriptor establishVpn(in VpnConfig config); |
Chia-chi Yeh | 77fd485 | 2011-07-02 17:15:00 -0700 | [diff] [blame] | 123 | |
Benedict Wong | b4b925f | 2019-11-05 12:56:25 -0800 | [diff] [blame] | 124 | boolean provisionVpnProfile(in VpnProfile profile, String packageName); |
| 125 | |
| 126 | void deleteVpnProfile(String packageName); |
| 127 | |
| 128 | void startVpnProfile(String packageName); |
| 129 | |
| 130 | void stopVpnProfile(String packageName); |
| 131 | |
Robin Lee | 3b3dd94 | 2015-05-12 18:14:58 +0100 | [diff] [blame] | 132 | VpnConfig getVpnConfig(int userId); |
Chad Brubaker | bf6ff2c | 2013-07-16 18:59:12 -0700 | [diff] [blame] | 133 | |
Andrei Onea | efd37ef | 2019-02-28 14:37:50 +0000 | [diff] [blame] | 134 | @UnsupportedAppUsage |
Jeff Sharkey | 82f8521 | 2012-08-24 11:17:25 -0700 | [diff] [blame] | 135 | void startLegacyVpn(in VpnProfile profile); |
Chia-chi Yeh | 2e46764 | 2011-07-04 03:23:12 -0700 | [diff] [blame] | 136 | |
Robin Lee | 3eed5ec | 2015-07-07 12:28:13 -0700 | [diff] [blame] | 137 | LegacyVpnInfo getLegacyVpnInfo(int userId); |
Jeff Sharkey | 69ddab4 | 2012-08-25 00:05:46 -0700 | [diff] [blame] | 138 | |
| 139 | boolean updateLockdownVpn(); |
Charles He | 3673863 | 2017-05-15 17:07:18 +0100 | [diff] [blame] | 140 | boolean isAlwaysOnVpnPackageSupported(int userId, String packageName); |
Pavel Grafov | a462bcb | 2019-01-25 08:50:06 +0000 | [diff] [blame] | 141 | boolean setAlwaysOnVpnPackage(int userId, String packageName, boolean lockdown, |
| 142 | in List<String> lockdownWhitelist); |
Robin Lee | 244ce8e | 2016-01-05 18:03:46 +0000 | [diff] [blame] | 143 | String getAlwaysOnVpnPackage(int userId); |
Pavel Grafov | a462bcb | 2019-01-25 08:50:06 +0000 | [diff] [blame] | 144 | boolean isVpnLockdownEnabled(int userId); |
| 145 | List<String> getVpnLockdownWhitelist(int userId); |
Irfan Sheriff | da6da09 | 2012-08-16 12:49:23 -0700 | [diff] [blame] | 146 | |
Wink Saville | 948282b | 2013-08-29 08:55:16 -0700 | [diff] [blame] | 147 | int checkMobileProvisioning(int suggestedTimeOutMs); |
Robert Greenwalt | e182bfe | 2013-07-16 12:06:09 -0700 | [diff] [blame] | 148 | |
| 149 | String getMobileProvisioningUrl(); |
Wink Saville | 42d4f08 | 2013-07-20 20:31:59 -0700 | [diff] [blame] | 150 | |
Paul Jensen | 89e0f09 | 2014-09-15 15:59:36 -0400 | [diff] [blame] | 151 | void setProvisioningNotificationVisible(boolean visible, int networkType, in String action); |
Yuhao Zheng | 5cd1a0e | 2013-09-09 17:00:04 -0700 | [diff] [blame] | 152 | |
| 153 | void setAirplaneMode(boolean enable); |
Robert Greenwalt | e049c23 | 2014-04-11 15:53:27 -0700 | [diff] [blame] | 154 | |
fenglu | db57147 | 2015-04-21 17:12:05 -0700 | [diff] [blame] | 155 | boolean requestBandwidthUpdate(in Network network); |
fenglu | b15e72b | 2015-03-20 11:29:56 -0700 | [diff] [blame] | 156 | |
Lorenzo Colitti | ae5cb71 | 2020-01-08 00:04:09 +0900 | [diff] [blame] | 157 | int registerNetworkFactory(in Messenger messenger, in String name); |
Robert Greenwalt | a67be03 | 2014-05-16 15:49:14 -0700 | [diff] [blame] | 158 | void unregisterNetworkFactory(in Messenger messenger); |
Robert Greenwalt | 7b81602 | 2014-04-18 15:25:25 -0700 | [diff] [blame] | 159 | |
Lorenzo Colitti | ae5cb71 | 2020-01-08 00:04:09 +0900 | [diff] [blame] | 160 | int registerNetworkProvider(in Messenger messenger, in String name); |
| 161 | void unregisterNetworkProvider(in Messenger messenger); |
| 162 | |
| 163 | void declareNetworkRequestUnfulfillable(in NetworkRequest request); |
| 164 | |
Chalard Jean | fe35bf9 | 2019-12-13 19:47:12 +0900 | [diff] [blame] | 165 | Network registerNetworkAgent(in Messenger messenger, in NetworkInfo ni, in LinkProperties lp, |
Chalard Jean | a11593c | 2020-02-21 19:37:21 +0900 | [diff] [blame] | 166 | in NetworkCapabilities nc, int score, in NetworkAgentConfig config, |
Lorenzo Colitti | 2dda9e0 | 2020-01-12 22:28:37 +0900 | [diff] [blame] | 167 | in int factorySerialNumber); |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 168 | |
| 169 | NetworkRequest requestNetwork(in NetworkCapabilities networkCapabilities, |
Roshan Pius | e38acab | 2020-01-16 12:17:17 -0800 | [diff] [blame] | 170 | in Messenger messenger, int timeoutSec, in IBinder binder, int legacy, |
| 171 | String callingPackageName); |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 172 | |
| 173 | NetworkRequest pendingRequestForNetwork(in NetworkCapabilities networkCapabilities, |
Roshan Pius | e38acab | 2020-01-16 12:17:17 -0800 | [diff] [blame] | 174 | in PendingIntent operation, String callingPackageName); |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 175 | |
Jeremy Joslin | 46e3ac8 | 2014-11-05 10:32:09 -0800 | [diff] [blame] | 176 | void releasePendingNetworkRequest(in PendingIntent operation); |
| 177 | |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 178 | NetworkRequest listenForNetwork(in NetworkCapabilities networkCapabilities, |
Roshan Pius | e38acab | 2020-01-16 12:17:17 -0800 | [diff] [blame] | 179 | in Messenger messenger, in IBinder binder, String callingPackageName); |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 180 | |
| 181 | void pendingListenForNetwork(in NetworkCapabilities networkCapabilities, |
Roshan Pius | e38acab | 2020-01-16 12:17:17 -0800 | [diff] [blame] | 182 | in PendingIntent operation, String callingPackageName); |
Robert Greenwalt | 9258c64 | 2014-03-26 16:47:06 -0700 | [diff] [blame] | 183 | |
| 184 | void releaseNetworkRequest(in NetworkRequest networkRequest); |
Robert Greenwalt | 71bf33a | 2014-05-15 18:07:26 -0700 | [diff] [blame] | 185 | |
Lorenzo Colitti | e03c3c7 | 2015-04-03 16:38:52 +0900 | [diff] [blame] | 186 | void setAcceptUnvalidated(in Network network, boolean accept, boolean always); |
lucaslin | e252a74 | 2019-03-12 13:08:03 +0800 | [diff] [blame] | 187 | void setAcceptPartialConnectivity(in Network network, boolean accept, boolean always); |
Lorenzo Colitti | 165c51c | 2016-09-19 01:00:19 +0900 | [diff] [blame] | 188 | void setAvoidUnvalidated(in Network network); |
Lorenzo Colitti | 4734cdb | 2017-04-27 14:30:21 +0900 | [diff] [blame] | 189 | void startCaptivePortalApp(in Network network); |
Remi NGUYEN VAN | cfff01e | 2019-02-13 20:58:59 +0900 | [diff] [blame] | 190 | void startCaptivePortalAppInternal(in Network network, in Bundle appExtras); |
Lorenzo Colitti | e03c3c7 | 2015-04-03 16:38:52 +0900 | [diff] [blame] | 191 | |
Remi NGUYEN VAN | e2365d6 | 2019-03-22 11:14:13 +0900 | [diff] [blame] | 192 | boolean shouldAvoidBadWifi(); |
Lorenzo Colitti | 46aa9c0 | 2017-01-24 18:08:41 +0900 | [diff] [blame] | 193 | int getMultipathPreference(in Network Network); |
| 194 | |
Remi NGUYEN VAN | e67b0c3 | 2018-12-27 16:43:56 +0900 | [diff] [blame] | 195 | NetworkRequest getDefaultRequest(); |
| 196 | |
Robert Greenwalt | 71bf33a | 2014-05-15 18:07:26 -0700 | [diff] [blame] | 197 | int getRestoreDefaultNetworkDelay(int networkType); |
Sreeram Ramachandran | f4e0c0c | 2014-07-27 14:18:26 -0700 | [diff] [blame] | 198 | |
| 199 | boolean addVpnAddress(String address, int prefixLength); |
| 200 | boolean removeVpnAddress(String address, int prefixLength); |
Sreeram Ramachandran | c2c0bea | 2014-11-11 16:09:21 -0800 | [diff] [blame] | 201 | boolean setUnderlyingNetworksForVpn(in Network[] networks); |
Stuart Scott | f1fb397 | 2015-04-02 18:00:02 -0700 | [diff] [blame] | 202 | |
| 203 | void factoryReset(); |
Lorenzo Colitti | 8bf977d | 2015-06-15 14:29:22 +0900 | [diff] [blame] | 204 | |
junyulai | 7c46917 | 2019-01-16 20:23:34 +0800 | [diff] [blame] | 205 | void startNattKeepalive(in Network network, int intervalSeconds, |
| 206 | in ISocketKeepaliveCallback cb, String srcAddr, int srcPort, String dstAddr); |
Lorenzo Colitti | 8bf977d | 2015-06-15 14:29:22 +0900 | [diff] [blame] | 207 | |
junyulai | 215b877 | 2019-01-15 11:32:44 +0800 | [diff] [blame] | 208 | void startNattKeepaliveWithFd(in Network network, in FileDescriptor fd, int resourceId, |
junyulai | 7c46917 | 2019-01-16 20:23:34 +0800 | [diff] [blame] | 209 | int intervalSeconds, in ISocketKeepaliveCallback cb, String srcAddr, |
junyulai | 215b877 | 2019-01-15 11:32:44 +0800 | [diff] [blame] | 210 | String dstAddr); |
| 211 | |
junyulai | 352dc2f | 2019-01-08 20:04:33 +0800 | [diff] [blame] | 212 | void startTcpKeepalive(in Network network, in FileDescriptor fd, int intervalSeconds, |
junyulai | 7c46917 | 2019-01-16 20:23:34 +0800 | [diff] [blame] | 213 | in ISocketKeepaliveCallback cb); |
junyulai | 352dc2f | 2019-01-08 20:04:33 +0800 | [diff] [blame] | 214 | |
Lorenzo Colitti | 8bf977d | 2015-06-15 14:29:22 +0900 | [diff] [blame] | 215 | void stopKeepalive(in Network network, int slot); |
Udam Saini | b7c2487 | 2016-01-04 12:16:14 -0800 | [diff] [blame] | 216 | |
| 217 | String getCaptivePortalServerUrl(); |
Ricky Wai | 44dcbde | 2018-01-23 04:09:45 +0000 | [diff] [blame] | 218 | |
| 219 | byte[] getNetworkWatchlistConfigHash(); |
Jeff Vander Stoep | 0ac2c09 | 2018-07-23 10:57:53 -0700 | [diff] [blame] | 220 | |
| 221 | int getConnectionOwnerUid(in ConnectionInfo connectionInfo); |
Pavel Grafov | cb3b895 | 2018-12-14 13:51:07 +0000 | [diff] [blame] | 222 | boolean isCallerCurrentAlwaysOnVpnApp(); |
| 223 | boolean isCallerCurrentAlwaysOnVpnLockdownApp(); |
markchien | f273127 | 2019-01-16 17:44:13 +0800 | [diff] [blame] | 224 | |
Cody Kesting | 5aadb8b | 2019-12-17 12:55:28 -0800 | [diff] [blame] | 225 | void registerConnectivityDiagnosticsCallback(in IConnectivityDiagnosticsCallback callback, |
Cody Kesting | a75e26b | 2020-01-05 14:06:39 -0800 | [diff] [blame] | 226 | in NetworkRequest request, String callingPackageName); |
Cody Kesting | 5aadb8b | 2019-12-17 12:55:28 -0800 | [diff] [blame] | 227 | void unregisterConnectivityDiagnosticsCallback(in IConnectivityDiagnosticsCallback callback); |
| 228 | |
Benedict Wong | a341fbc | 2018-11-09 14:45:34 -0800 | [diff] [blame] | 229 | IBinder startOrGetTestNetworkService(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 230 | } |