1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Extended debug info

This commit is contained in:
M66B 2021-09-27 16:32:21 +02:00
parent 7dd51b817a
commit cf13c166c0

View file

@ -1980,6 +1980,7 @@ public class Log {
for (TupleFolderEx folder : folders)
if (folder.synchronize)
size += write(os, "- " + folder.name + " " + folder.type +
" notify=" + folder.notify +
" poll=" + folder.poll + "/" + folder.poll_factor +
" days=" + folder.sync_days + "/" + folder.keep_days +
" msgs=" + folder.content + "/" + folder.messages +
@ -2278,6 +2279,31 @@ public class Log {
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(file))) {
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
String name;
int filter = nm.getCurrentInterruptionFilter();
switch (filter) {
case NotificationManager.INTERRUPTION_FILTER_UNKNOWN:
name = "Unknown";
break;
case NotificationManager.INTERRUPTION_FILTER_ALL:
name = "All";
break;
case NotificationManager.INTERRUPTION_FILTER_PRIORITY:
name = "Priority";
break;
case NotificationManager.INTERRUPTION_FILTER_NONE:
name = "None";
break;
case NotificationManager.INTERRUPTION_FILTER_ALARMS:
name = "Alarms";
break;
default:
name = Integer.toString(filter);
}
size += write(os, String.format("Interruption filter=%s\r\n\r\n", name));
for (NotificationChannel channel : nm.getNotificationChannels())
try {
JSONObject jchannel = NotificationHelper.channelToJSON(channel);