From 3e09dd6157208a814fe804a85ce3e8fcc133337b Mon Sep 17 00:00:00 2001 From: Sudip Roy <59234028+imsudiproy@users.noreply.github.com> Date: Sat, 9 Oct 2021 18:16:29 +0530 Subject: [PATCH] Update NetworkUtils.java --- fake_land/NetworkUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fake_land/NetworkUtils.java b/fake_land/NetworkUtils.java index fb2c5c8..890c816 100644 --- a/fake_land/NetworkUtils.java +++ b/fake_land/NetworkUtils.java @@ -12,6 +12,7 @@ public class NetworkUtils { public static boolean isNetworkAvailable(Context c) { Context context = c.getApplicationContext(); // 获取手机所有连接管理对象(包括对wi-fi,net等连接的管理) + ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivityManager == null) {