Improved debug info

This commit is contained in:
M66B 2022-06-19 08:14:22 +02:00
parent e0c54d5d3d
commit 48425613e0
1 changed files with 11 additions and 0 deletions

View File

@ -2156,6 +2156,14 @@ public class Log {
boolean ng = Helper.isInstalled(context, "eu.faircode.netguard");
boolean tc = Helper.isInstalled(context, "net.kollnig.missioncontrol");
Integer bucket = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
try {
UsageStatsManager usm = Helper.getSystemService(context, UsageStatsManager.class);
bucket = usm.getAppStandbyBucket();
} catch (Throwable ignored) {
}
size += write(os, "enabled=" + enabled + (enabled ? "" : " !!!") +
" interval=" + pollInterval + "\r\n" +
"metered=" + metered + (metered ? "" : " !!!") +
@ -2163,6 +2171,9 @@ public class Log {
" vpn=" + vpn + (vpn ? " !!!" : "") +
" ng=" + ng + " tc=" + tc + "\r\n" +
"optimizing=" + (ignoring == null ? null : !ignoring) + (Boolean.FALSE.equals(ignoring) ? " !!!" : "") +
" bucket=" +
(bucket == null ? null : Helper.getStandbyBucketName(bucket)) +
(bucket != null && bucket > UsageStatsManager.STANDBY_BUCKET_ACTIVE ? " !!!" : "") +
" canSchedule=" + canSchedule + (canSchedule ? "" : " !!!") +
" auto_optimize=" + auto_optimize + (auto_optimize ? " !!!" : "") + "\r\n" +
"accounts=" + accounts.size() +