mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Added ARenzi`s Reachability fixes.
This commit is contained in:
@@ -32,8 +32,13 @@ public class NetworkManager {
|
||||
public boolean isWifiActive()
|
||||
{
|
||||
NetworkInfo info = sockMan.getActiveNetworkInfo();
|
||||
String type = info.getTypeName();
|
||||
return type.equals("WIFI");
|
||||
String type = "";
|
||||
if (info!=null)
|
||||
{
|
||||
info.getTypeName();
|
||||
return type.equals("WIFI")
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isReachable(String uri)
|
||||
@@ -50,6 +55,4 @@ public class NetworkManager {
|
||||
}
|
||||
return reached;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user