mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
Fixing null error in NetworkManager
This commit is contained in:
parent
5fb6aa77b3
commit
3898130a30
@ -23,7 +23,9 @@ public class NetworkManager {
|
|||||||
public boolean isAvailable()
|
public boolean isAvailable()
|
||||||
{
|
{
|
||||||
NetworkInfo info = sockMan.getActiveNetworkInfo();
|
NetworkInfo info = sockMan.getActiveNetworkInfo();
|
||||||
boolean conn = info.isConnected();
|
boolean conn = false;
|
||||||
|
if(info != null)
|
||||||
|
conn = info.isConnected();
|
||||||
return conn;
|
return conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ public class PhoneGap{
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void httpGet(String url, String file)
|
public void httpGet(String url, String file)
|
||||||
/**
|
/**
|
||||||
* grabs a file from specified url and saves it to a name and location
|
* grabs a file from specified url and saves it to a name and location
|
||||||
|
Loading…
Reference in New Issue
Block a user