Merge "Fix Automated API Review issues."
This commit is contained in:
@@ -2174,7 +2174,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
if (VDBG) log("identical MTU - not setting");
|
||||
return;
|
||||
}
|
||||
if (LinkProperties.isValidMtu(mtu, newLp.hasGlobalIPv6Address()) == false) {
|
||||
if (!LinkProperties.isValidMtu(mtu, newLp.hasGlobalIpv6Address())) {
|
||||
if (mtu != 0) loge("Unexpected mtu value: " + mtu + ", " + iface);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,8 +107,8 @@ public class Nat464Xlat extends BaseNetworkObserver {
|
||||
// Only run clat on networks that have a global IPv6 address and don't have a native IPv4
|
||||
// address.
|
||||
LinkProperties lp = nai.linkProperties;
|
||||
final boolean isIpv6OnlyNetwork = (lp != null) && lp.hasGlobalIPv6Address()
|
||||
&& !lp.hasIPv4Address();
|
||||
final boolean isIpv6OnlyNetwork = (lp != null) && lp.hasGlobalIpv6Address()
|
||||
&& !lp.hasIpv4Address();
|
||||
|
||||
// If the network tells us it doesn't use clat, respect that.
|
||||
final boolean skip464xlat = (nai.netMisc() != null) && nai.netMisc().skip464xlat;
|
||||
|
||||
@@ -34,10 +34,12 @@ import android.util.Pair;
|
||||
|
||||
import com.android.internal.util.IndentingPrintWriter;
|
||||
|
||||
import libcore.io.IoUtils;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
@@ -48,17 +50,13 @@ import java.net.SocketException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import libcore.io.IoUtils;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* NetworkDiagnostics
|
||||
@@ -186,7 +184,7 @@ public class NetworkDiagnostics {
|
||||
// TODO: we could use mLinkProperties.isReachable(TEST_DNS6) here, because we won't set any
|
||||
// DNS servers for which isReachable() is false, but since this is diagnostic code, be extra
|
||||
// careful.
|
||||
if (mLinkProperties.hasGlobalIPv6Address() || mLinkProperties.hasIPv6DefaultRoute()) {
|
||||
if (mLinkProperties.hasGlobalIpv6Address() || mLinkProperties.hasIpv6DefaultRoute()) {
|
||||
mLinkProperties.addDnsServer(TEST_DNS6);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user