Added logging

pull/214/head
M66B 1 year ago
parent 94c6fca5dc
commit da4c70db32

@ -652,11 +652,14 @@ public class ConnectionHelper {
ConnectivityManager cm = Helper.getSystemService(context, ConnectivityManager.class);
Network active = (cm == null ? null : cm.getActiveNetwork());
LinkProperties props = (active == null ? null : cm.getLinkProperties(active));
ifacename = (props == null ? null : props.getInterfaceName());
List<LinkAddress> las = (props == null ? null : props.getLinkAddresses());
if (las != null)
for (LinkAddress la : las) {
InetAddress addr = la.getAddress();
boolean local = (addr.isLoopbackAddress() || addr.isLinkLocalAddress());
EntityLog.log(context, EntityLog.Type.Network,
"Link addr=" + addr + " local=" + local + " interface=" + ifacename);
if (local)
continue;
if (addr instanceof Inet4Address)

Loading…
Cancel
Save