mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 01:06:04 +00:00
Improved debug info
This commit is contained in:
parent
c51fd1c1ee
commit
962e637aee
1 changed files with 10 additions and 6 deletions
|
@ -33,6 +33,7 @@ import android.content.res.Configuration;
|
|||
import android.database.sqlite.SQLiteFullException;
|
||||
import android.graphics.Point;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.LinkProperties;
|
||||
import android.net.Network;
|
||||
import android.net.NetworkCapabilities;
|
||||
import android.net.NetworkInfo;
|
||||
|
@ -1502,14 +1503,17 @@ public class Log {
|
|||
" type=" + ani.getType() + "/" + ani.getTypeName() +
|
||||
"\r\n\r\n");
|
||||
|
||||
Network active = null;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
active = cm.getActiveNetwork();
|
||||
|
||||
Network active = ConnectionHelper.getActiveNetwork(context);
|
||||
for (Network network : cm.getAllNetworks()) {
|
||||
size += write(os, (network.equals(active) ? "active=" : "network=") + network + "\r\n");
|
||||
|
||||
NetworkCapabilities caps = cm.getNetworkCapabilities(network);
|
||||
size += write(os, (network.equals(active) ? "active=" : "network=") + network +
|
||||
" capabilities=" + caps + "\r\n\r\n");
|
||||
size += write(os, " caps=" + caps + "\r\n");
|
||||
|
||||
LinkProperties props = cm.getLinkProperties(network);
|
||||
size += write(os, " props=" + props + "\r\n");
|
||||
|
||||
size += write(os, "\r\n");
|
||||
}
|
||||
|
||||
size += write(os, "VPN active=" + ConnectionHelper.vpnActive(context) + "\r\n\r\n");
|
||||
|
|
Loading…
Reference in a new issue