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,8 +32,13 @@ public class NetworkManager {
public boolean isWifiActive() public boolean isWifiActive()
{ {
NetworkInfo info = sockMan.getActiveNetworkInfo(); NetworkInfo info = sockMan.getActiveNetworkInfo();
String type = info.getTypeName(); if(info != null)
return type.equals("WIFI"); {
String type = info.getTypeName();
return type.equals("WIFI");
}
else
return false;
} }
public boolean isReachable(String uri) public boolean isReachable(String uri)