Merge m-c to inbound on a CLOSED TREE.
This commit is contained in:
@@ -1515,9 +1515,13 @@ public class GeckoAppShell
|
||||
public static boolean isNetworkLinkUp() {
|
||||
ConnectivityManager cm = (ConnectivityManager)
|
||||
getContext().getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo info = cm.getActiveNetworkInfo();
|
||||
if (info == null || !info.isConnected())
|
||||
try {
|
||||
NetworkInfo info = cm.getActiveNetworkInfo();
|
||||
if (info == null || !info.isConnected())
|
||||
return false;
|
||||
} catch (SecurityException se) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1525,8 +1529,12 @@ public class GeckoAppShell
|
||||
public static boolean isNetworkLinkKnown() {
|
||||
ConnectivityManager cm = (ConnectivityManager)
|
||||
getContext().getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
if (cm.getActiveNetworkInfo() == null)
|
||||
try {
|
||||
if (cm.getActiveNetworkInfo() == null)
|
||||
return false;
|
||||
} catch (SecurityException se) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user