mirror of https://github.com/M66B/NetGuard.git
Simplification
This commit is contained in:
parent
3c14c2659e
commit
52dfc830c0
|
@ -160,7 +160,7 @@ public class Util {
|
|||
|
||||
public static boolean isNetworkActive(Context context) {
|
||||
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
return (cm == null ? false : cm.getActiveNetworkInfo() != null);
|
||||
return (cm != null && cm.getActiveNetworkInfo() != null);
|
||||
}
|
||||
|
||||
public static boolean isConnected(Context context) {
|
||||
|
|
Loading…
Reference in New Issue