mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Fixed a null error on NetworkManager
This commit is contained in:
parent
594e77690c
commit
693cb4695f
@ -32,9 +32,14 @@ public class NetworkManager {
|
||||
public boolean isWifiActive()
|
||||
{
|
||||
NetworkInfo info = sockMan.getActiveNetworkInfo();
|
||||
if(info != null)
|
||||
{
|
||||
String type = info.getTypeName();
|
||||
return type.equals("WIFI");
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isReachable(String uri)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user