//package ro.ui.pttdroid.util;
import java.io.IOException;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Enumeration;
import java.util.LinkedList;
import android.util.Log;
class PhoneIPs {
static private LinkedList inetAddresses = new LinkedList();
public static void load() {
inetAddresses.clear();
try {
Enumeration networkInterfaceEnum = NetworkInterface.getNetworkInterfaces();
while(networkInterfaceEnum.hasMoreElements()) {
Enumeration inetAddresseEnum = networkInterfaceEnum.nextElement().getInetAddresses();
while(inetAddresseEnum.hasMoreElements()) {
inetAddresses.add(inetAddresseEnum.nextElement());
}
}
}
catch(IOException e) {
Log.d("MyNetworkInterfaces", e.toString());
}
}
public static boolean contains(InetAddress addr) {
return inetAddresses.contains(addr);
}
}