diff --git a/Android/doric/src/main/java/pub/doric/utils/DoricUtils.java b/Android/doric/src/main/java/pub/doric/utils/DoricUtils.java index fc6d310b..28cb33aa 100644 --- a/Android/doric/src/main/java/pub/doric/utils/DoricUtils.java +++ b/Android/doric/src/main/java/pub/doric/utils/DoricUtils.java @@ -37,10 +37,6 @@ import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Array; import java.lang.reflect.Field; -import java.net.InetAddress; -import java.net.NetworkInterface; -import java.net.SocketException; -import java.util.Enumeration; import pub.doric.Doric; @@ -237,21 +233,4 @@ public class DoricUtils { } return sbar; } - - public static String getLocalIpAddress() { - try { - for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements(); ) { - NetworkInterface intf = en.nextElement(); - for (Enumeration enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements(); ) { - InetAddress inetAddress = enumIpAddr.nextElement(); - if (!inetAddress.isLoopbackAddress()) { - return inetAddress.getHostAddress().toString(); - } - } - } - } catch (SocketException ex) { - System.out.println(ex); - } - return null; - } }