mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12: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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user