From 3fc99cd01ef349198cfb696b79a0e198c516a52d Mon Sep 17 00:00:00 2001 From: wangkai Date: Tue, 31 Aug 2021 13:18:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=BB=9C=E5=88=87=E6=8D=A2=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E4=B8=8B=E8=BD=BD=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/arialyy/aria/core/AriaConfig.java | 2 +- .../src/main/java/com/arialyy/aria/util/NetUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PublicComponent/src/main/java/com/arialyy/aria/core/AriaConfig.java b/PublicComponent/src/main/java/com/arialyy/aria/core/AriaConfig.java index 183d4aa8..05cede1c 100644 --- a/PublicComponent/src/main/java/com/arialyy/aria/core/AriaConfig.java +++ b/PublicComponent/src/main/java/com/arialyy/aria/core/AriaConfig.java @@ -157,7 +157,7 @@ public class AriaConfig { } } - private boolean isNetworkAvailable() { + public boolean isNetworkAvailable() { // 获取手机所有连接管理对象(包括对wi-fi,net等连接的管理) ConnectivityManager connectivityManager = (ConnectivityManager) getAPP().getSystemService(Context.CONNECTIVITY_SERVICE); diff --git a/PublicComponent/src/main/java/com/arialyy/aria/util/NetUtils.java b/PublicComponent/src/main/java/com/arialyy/aria/util/NetUtils.java index dac9de4d..b94d2865 100644 --- a/PublicComponent/src/main/java/com/arialyy/aria/util/NetUtils.java +++ b/PublicComponent/src/main/java/com/arialyy/aria/util/NetUtils.java @@ -61,7 +61,7 @@ public class NetUtils { return true; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - return AriaConfig.getInstance().isConnectedNet(); + return AriaConfig.getInstance().isNetworkAvailable(); } ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);