Loading core/java/android/net/ConnectivityManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -608,7 +608,7 @@ public class ConnectivityManager { public static final int TYPE_BLUETOOTH = 7; /** * Dummy data connection. This should not be used on shipping devices. * Fake data connection. This should not be used on shipping devices. * @deprecated This is not used any more. */ @Deprecated Loading Loading @@ -1084,9 +1084,9 @@ public class ConnectivityManager { * to remove an existing always-on VPN configuration. * @param lockdownEnabled {@code true} to disallow networking when the VPN is not connected or * {@code false} otherwise. * @param lockdownWhitelist The list of packages that are allowed to access network directly * @param lockdownAllowlist The list of packages that are allowed to access network directly * when VPN is in lockdown mode but is not running. Non-existent packages are ignored so * this method must be called when a package that should be whitelisted is installed or * this method must be called when a package that should be allowed is installed or * uninstalled. * @return {@code true} if the package is set as always-on VPN controller; * {@code false} otherwise. Loading @@ -1094,10 +1094,10 @@ public class ConnectivityManager { */ @RequiresPermission(android.Manifest.permission.CONTROL_ALWAYS_ON_VPN) public boolean setAlwaysOnVpnPackageForUser(int userId, @Nullable String vpnPackage, boolean lockdownEnabled, @Nullable List<String> lockdownWhitelist) { boolean lockdownEnabled, @Nullable List<String> lockdownAllowlist) { try { return mService.setAlwaysOnVpnPackage( userId, vpnPackage, lockdownEnabled, lockdownWhitelist); userId, vpnPackage, lockdownEnabled, lockdownAllowlist); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading core/java/android/net/NetworkState.java +2 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import android.util.Slog; * @hide */ public class NetworkState implements Parcelable { private static final boolean SANITY_CHECK_ROAMING = false; private static final boolean VALIDATE_ROAMING_STATE = false; public static final NetworkState EMPTY = new NetworkState(null, null, null, null, null, null); Loading @@ -52,7 +52,7 @@ public class NetworkState implements Parcelable { // This object is an atomic view of a network, so the various components // should always agree on roaming state. if (SANITY_CHECK_ROAMING && networkInfo != null && networkCapabilities != null) { if (VALIDATE_ROAMING_STATE && networkInfo != null && networkCapabilities != null) { if (networkInfo.isRoaming() == networkCapabilities .hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING)) { Slog.wtf("NetworkState", "Roaming state disagreement between " + networkInfo Loading core/java/android/net/SntpClient.java +1 −1 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ public class SntpClient { final long receiveTime = readTimeStamp(buffer, RECEIVE_TIME_OFFSET); final long transmitTime = readTimeStamp(buffer, TRANSMIT_TIME_OFFSET); /* do sanity check according to RFC */ /* Do validation according to RFC */ // TODO: validate originateTime == requestTime. checkValidServerReply(leap, mode, stratum, transmitTime); Loading core/java/android/net/VpnService.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ import java.util.Set; * <p> The Android system starts a VPN in the background by calling * {@link android.content.Context#startService startService()}. In Android 8.0 * (API level 26) and higher, the system places VPN apps on the temporary * whitelist for a short period so the app can start in the background. The VPN * allowlist for a short period so the app can start in the background. The VPN * app must promote itself to the foreground after it's launched or the system * will shut down the app. * Loading services/core/java/com/android/server/net/NetworkStatsFactory.java +2 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ public class NetworkStatsFactory { private static final String TAG = "NetworkStatsFactory"; private static final boolean USE_NATIVE_PARSING = true; private static final boolean SANITY_CHECK_NATIVE = false; private static final boolean VALIDATE_NATIVE_STATS = false; /** Path to {@code /proc/net/xt_qtaguid/iface_stat_all}. */ private final File mStatsXtIfaceAll; Loading Loading @@ -347,7 +347,7 @@ public class NetworkStatsFactory { INTERFACES_ALL, TAG_ALL, mUseBpfStats) != 0) { throw new IOException("Failed to parse network stats"); } if (SANITY_CHECK_NATIVE) { if (VALIDATE_NATIVE_STATS) { final NetworkStats javaStats = javaReadNetworkStatsDetail(mStatsXtUid, UID_ALL, INTERFACES_ALL, TAG_ALL); assertEquals(javaStats, stats); Loading Loading
core/java/android/net/ConnectivityManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -608,7 +608,7 @@ public class ConnectivityManager { public static final int TYPE_BLUETOOTH = 7; /** * Dummy data connection. This should not be used on shipping devices. * Fake data connection. This should not be used on shipping devices. * @deprecated This is not used any more. */ @Deprecated Loading Loading @@ -1084,9 +1084,9 @@ public class ConnectivityManager { * to remove an existing always-on VPN configuration. * @param lockdownEnabled {@code true} to disallow networking when the VPN is not connected or * {@code false} otherwise. * @param lockdownWhitelist The list of packages that are allowed to access network directly * @param lockdownAllowlist The list of packages that are allowed to access network directly * when VPN is in lockdown mode but is not running. Non-existent packages are ignored so * this method must be called when a package that should be whitelisted is installed or * this method must be called when a package that should be allowed is installed or * uninstalled. * @return {@code true} if the package is set as always-on VPN controller; * {@code false} otherwise. Loading @@ -1094,10 +1094,10 @@ public class ConnectivityManager { */ @RequiresPermission(android.Manifest.permission.CONTROL_ALWAYS_ON_VPN) public boolean setAlwaysOnVpnPackageForUser(int userId, @Nullable String vpnPackage, boolean lockdownEnabled, @Nullable List<String> lockdownWhitelist) { boolean lockdownEnabled, @Nullable List<String> lockdownAllowlist) { try { return mService.setAlwaysOnVpnPackage( userId, vpnPackage, lockdownEnabled, lockdownWhitelist); userId, vpnPackage, lockdownEnabled, lockdownAllowlist); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
core/java/android/net/NetworkState.java +2 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import android.util.Slog; * @hide */ public class NetworkState implements Parcelable { private static final boolean SANITY_CHECK_ROAMING = false; private static final boolean VALIDATE_ROAMING_STATE = false; public static final NetworkState EMPTY = new NetworkState(null, null, null, null, null, null); Loading @@ -52,7 +52,7 @@ public class NetworkState implements Parcelable { // This object is an atomic view of a network, so the various components // should always agree on roaming state. if (SANITY_CHECK_ROAMING && networkInfo != null && networkCapabilities != null) { if (VALIDATE_ROAMING_STATE && networkInfo != null && networkCapabilities != null) { if (networkInfo.isRoaming() == networkCapabilities .hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING)) { Slog.wtf("NetworkState", "Roaming state disagreement between " + networkInfo Loading
core/java/android/net/SntpClient.java +1 −1 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ public class SntpClient { final long receiveTime = readTimeStamp(buffer, RECEIVE_TIME_OFFSET); final long transmitTime = readTimeStamp(buffer, TRANSMIT_TIME_OFFSET); /* do sanity check according to RFC */ /* Do validation according to RFC */ // TODO: validate originateTime == requestTime. checkValidServerReply(leap, mode, stratum, transmitTime); Loading
core/java/android/net/VpnService.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ import java.util.Set; * <p> The Android system starts a VPN in the background by calling * {@link android.content.Context#startService startService()}. In Android 8.0 * (API level 26) and higher, the system places VPN apps on the temporary * whitelist for a short period so the app can start in the background. The VPN * allowlist for a short period so the app can start in the background. The VPN * app must promote itself to the foreground after it's launched or the system * will shut down the app. * Loading
services/core/java/com/android/server/net/NetworkStatsFactory.java +2 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ public class NetworkStatsFactory { private static final String TAG = "NetworkStatsFactory"; private static final boolean USE_NATIVE_PARSING = true; private static final boolean SANITY_CHECK_NATIVE = false; private static final boolean VALIDATE_NATIVE_STATS = false; /** Path to {@code /proc/net/xt_qtaguid/iface_stat_all}. */ private final File mStatsXtIfaceAll; Loading Loading @@ -347,7 +347,7 @@ public class NetworkStatsFactory { INTERFACES_ALL, TAG_ALL, mUseBpfStats) != 0) { throw new IOException("Failed to parse network stats"); } if (SANITY_CHECK_NATIVE) { if (VALIDATE_NATIVE_STATS) { final NetworkStats javaStats = javaReadNetworkStatsDetail(mStatsXtUid, UID_ALL, INTERFACES_ALL, TAG_ALL); assertEquals(javaStats, stats); Loading