refactor: 网络状态 新增是否是以太网的判断;

This commit is contained in:
aibingbing
2023-03-05 14:34:23 +08:00
parent 281078ff48
commit acaaac6b30

View File

@@ -118,6 +118,7 @@ public final class NetworkUtils {
if ( infoWifi != null ) {
NetworkInfo.State wifi = infoWifi.getState();
if ( wifi == NetworkInfo.State.CONNECTED ) {
return true;
}
}
@@ -129,6 +130,10 @@ public final class NetworkUtils {
return true;
}
}
if (isEthernet()) {
return true;
}
return false;
}