mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-24 15:21:19 +00:00
Simplify network info
This commit is contained in:
parent
f6f6ca1f69
commit
dc2399eb4e
1 changed files with 1 additions and 2 deletions
|
@ -378,8 +378,6 @@ public class Util {
|
|||
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
|
||||
NetworkInfo ani = cm.getActiveNetworkInfo();
|
||||
sb.append("Active ").append(ani == null ? "" : ani.getTypeName() + "/" + ani.getSubtypeName()).append("\r\n");
|
||||
|
||||
for (Network network : cm.getAllNetworks()) {
|
||||
NetworkInfo ni = cm.getNetworkInfo(network);
|
||||
if (ni != null)
|
||||
|
@ -390,6 +388,7 @@ public class Util {
|
|||
.append(TextUtils.isEmpty(ni.getExtraInfo()) ? "" : " " + ni.getExtraInfo())
|
||||
.append(ni.getType() == ConnectivityManager.TYPE_MOBILE ? " " + Util.getNetworkGeneration(ni.getSubtype()) : "")
|
||||
.append(ni.isRoaming() ? " R" : "")
|
||||
.append(ani != null && ni.getType() == ani.getType() && ni.getSubtype() == ani.getSubtype() ? " *" : "")
|
||||
.append("\r\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue