Fixed a null error on NetworkManager

This commit is contained in:
Brock Whitten 2010-02-24 15:43:00 -08:00
parent 594e77690c
commit 693cb4695f

View File

@ -32,9 +32,14 @@ public class NetworkManager {
public boolean isWifiActive() public boolean isWifiActive()
{ {
NetworkInfo info = sockMan.getActiveNetworkInfo(); NetworkInfo info = sockMan.getActiveNetworkInfo();
if(info != null)
{
String type = info.getTypeName(); String type = info.getTypeName();
return type.equals("WIFI"); return type.equals("WIFI");
} }
else
return false;
}
public boolean isReachable(String uri) public boolean isReachable(String uri)
{ {