mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-26 02:45:31 +01:00
Debug: classifier file size
This commit is contained in:
@@ -2048,6 +2048,10 @@ public class Log {
|
||||
.append(TextHelper.canTransliterate())
|
||||
.append("\r\n");
|
||||
|
||||
sb.append("Classifier: ")
|
||||
.append(Helper.humanReadableByteCount(MessageClassifier.getSize(context)))
|
||||
.append("\r\n");
|
||||
|
||||
sb.append("\r\n");
|
||||
|
||||
int cpus = Runtime.getRuntime().availableProcessors();
|
||||
|
||||
@@ -759,8 +759,11 @@ public class MessageClassifier {
|
||||
}
|
||||
|
||||
static long getSize(Context context) {
|
||||
File file = getFile(context, false);
|
||||
return (file.exists() ? file.length() : -1L);
|
||||
try {
|
||||
return getFile(context, false).length();
|
||||
} catch (Throwable ignored) {
|
||||
return -1L;
|
||||
}
|
||||
}
|
||||
|
||||
private static class State {
|
||||
|
||||
Reference in New Issue
Block a user