|
|
@ -654,7 +654,7 @@ public class ConnectionHelper {
|
|
|
|
LinkProperties props = (active == null ? null : cm.getLinkProperties(active));
|
|
|
|
LinkProperties props = (active == null ? null : cm.getLinkProperties(active));
|
|
|
|
ifacename = (props == null ? null : props.getInterfaceName());
|
|
|
|
ifacename = (props == null ? null : props.getInterfaceName());
|
|
|
|
List<LinkAddress> las = (props == null ? null : props.getLinkAddresses());
|
|
|
|
List<LinkAddress> las = (props == null ? null : props.getLinkAddresses());
|
|
|
|
if (las != null)
|
|
|
|
if (las != null && las.size() > 0) {
|
|
|
|
for (LinkAddress la : las) {
|
|
|
|
for (LinkAddress la : las) {
|
|
|
|
InetAddress addr = la.getAddress();
|
|
|
|
InetAddress addr = la.getAddress();
|
|
|
|
boolean local = (addr.isLoopbackAddress() || addr.isLinkLocalAddress());
|
|
|
|
boolean local = (addr.isLoopbackAddress() || addr.isLinkLocalAddress());
|
|
|
@ -668,6 +668,7 @@ public class ConnectionHelper {
|
|
|
|
has6 = true;
|
|
|
|
has6 = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return new boolean[]{has4, has6};
|
|
|
|
return new boolean[]{has4, has6};
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
Log.e(ex);
|
|
|
|
Log.e(ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|