From d756db14a762b7f44b756ffc81e61eca0ca18d55 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 14 Jun 2022 15:22:39 +0200 Subject: [PATCH] Debug info: moved mount points to environment --- app/src/main/java/eu/faircode/email/Log.java | 39 ++++++++++---------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index b6c91b1ac7..47fb3d727c 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -1924,25 +1924,6 @@ public class Log { sb.append("\r\n"); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) - try { - for (FileStore store : FileSystems.getDefault().getFileStores()) - if (!store.isReadOnly() && - store.getUsableSpace() != 0 && - !"tmpfs".equals(store.type())) { - long total = store.getTotalSpace(); - long unalloc = store.getUnallocatedSpace(); - sb.append(String.format("%s %s %s/%s\r\n", - store, - store.type(), - Helper.humanReadableByteCount(total - unalloc), - Helper.humanReadableByteCount(total))); - } - sb.append("\r\n"); - } catch (IOException ex) { - sb.append(ex).append("\r\n"); - } - WindowManager wm = Helper.getSystemService(context, WindowManager.class); Display display = wm.getDefaultDisplay(); Point dim = new Point(); @@ -2689,6 +2670,26 @@ public class Log { } size += write(os, "\r\n"); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + try { + for (FileStore store : FileSystems.getDefault().getFileStores()) + if (!store.isReadOnly() && + store.getUsableSpace() != 0 && + !"tmpfs".equals(store.type())) { + long total = store.getTotalSpace(); + long unalloc = store.getUnallocatedSpace(); + size += write(os, String.format("%s %s %s/%s\r\n", + store, + store.type(), + Helper.humanReadableByteCount(total - unalloc), + Helper.humanReadableByteCount(total))); + } + } catch (IOException ex) { + size += write(os, String.format("%s\r\n", ex)); + } + size += write(os, "\r\n"); + } + size += write(os, String.format("Configuration: %s\r\n\r\n", context.getResources().getConfiguration()));