mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-22 07:43:15 +00:00
Simplification
This commit is contained in:
parent
3c14c2659e
commit
52dfc830c0
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue