@@ -157,7 +157,7 @@ public class AriaConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isNetworkAvailable() {
|
public boolean isNetworkAvailable() {
|
||||||
// 获取手机所有连接管理对象(包括对wi-fi,net等连接的管理)
|
// 获取手机所有连接管理对象(包括对wi-fi,net等连接的管理)
|
||||||
ConnectivityManager connectivityManager =
|
ConnectivityManager connectivityManager =
|
||||||
(ConnectivityManager) getAPP().getSystemService(Context.CONNECTIVITY_SERVICE);
|
(ConnectivityManager) getAPP().getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class NetUtils {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
return AriaConfig.getInstance().isConnectedNet();
|
return AriaConfig.getInstance().isNetworkAvailable();
|
||||||
}
|
}
|
||||||
ConnectivityManager cm =
|
ConnectivityManager cm =
|
||||||
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
|||||||
Reference in New Issue
Block a user