Enable 464xlat on wifi.

Bug: 12111730
Change-Id: If6d118a3c6e163262b09cc2fb3e3d3f9a81986ec
This commit is contained in:
Lorenzo Colitti
2014-10-28 15:24:03 +09:00
parent 8e8662929b
commit 9a66159292

View File

@@ -91,8 +91,9 @@ public class Nat464Xlat extends BaseNetworkObserver {
final boolean connected = nai.networkInfo.isConnected();
final boolean hasIPv4Address =
(nai.linkProperties != null) ? nai.linkProperties.hasIPv4Address() : false;
// Only support clat on mobile for now.
return netType == TYPE_MOBILE && connected && !hasIPv4Address;
// Only support clat on mobile and wifi for now, because these are the only IPv6-only
// networks we can connect to.
return connected && !hasIPv4Address && (netType == TYPE_MOBILE || netType == TYPE_WIFI);
}
/**