mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-07-08 20:16:24 +00:00
Improve debug info
This commit is contained in:
parent
4be6a25eb6
commit
b638c2584b
|
@ -20,6 +20,9 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.Loader;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.ProxyInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
|
@ -222,6 +225,30 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
|||
App.log.log(Level.SEVERE, "Couldn't get software information", ex);
|
||||
}
|
||||
|
||||
report.append("CONNECTIVITY (at the moment)\n");
|
||||
ConnectivityManager cm = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
report.append("Active connection: ");
|
||||
NetworkInfo networkInfo = cm.getActiveNetworkInfo();
|
||||
if (networkInfo != null) {
|
||||
String type;
|
||||
switch (networkInfo.getType()) {
|
||||
case ConnectivityManager.TYPE_WIFI: type = "WiFI"; break;
|
||||
case ConnectivityManager.TYPE_MOBILE: type = "mobile"; break;
|
||||
default: type = "type: " + String.valueOf(networkInfo.getType());
|
||||
}
|
||||
report .append(type).append(", ")
|
||||
.append(networkInfo.getDetailedState().toString());
|
||||
} else
|
||||
report.append("none");
|
||||
report.append("\n");
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
ProxyInfo proxy = cm.getDefaultProxy();
|
||||
report .append("System default proxy: ")
|
||||
.append(proxy == null ? "none" : proxy.getHost()+":"+proxy.getPort())
|
||||
.append("\n");
|
||||
}
|
||||
report.append("\n");
|
||||
|
||||
report.append("CONFIGURATION\n");
|
||||
// power saving
|
||||
PowerManager powerManager = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f140ee2ebc6cd075a16e0f704673e288a47b2a0d
|
||||
Subproject commit 4b136453631ae7d0fe8666d2aa5d7196969ef249
|
3
scripts/adb-log.sh
Executable file
3
scripts/adb-log.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
adb shell setprop log.tag.davdroid VERBOSE
|
||||
adb shell setprop log.tag.dav4android VERBOSE
|
Loading…
Reference in New Issue
Block a user