From ac36f1b2280cb04272515d2769683269fe7c8b4e Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 9 Feb 2020 14:23:41 +0100 Subject: [PATCH] Filter exceptions --- app/src/main/java/eu/faircode/email/Log.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index a086fe9ef4..8f5cf04313 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -301,14 +301,16 @@ public class Log { ex.getMessage() != null && (ex.getMessage().startsWith("Download image failed") || ex.getMessage().startsWith("http://") || - ex.getMessage().startsWith("https://"))) + ex.getMessage().startsWith("https://") || + ex.getMessage().startsWith("content://"))) return false; if (ex instanceof IOException && ex.getMessage() != null && (ex.getMessage().startsWith("HTTP status=") || "NetworkError".equals(ex.getMessage()) || // account manager - "Resetting to invalid mark".equals(ex.getMessage()))) + "Resetting to invalid mark".equals(ex.getMessage()) || + "Mark has been invalidated.".equals(ex.getMessage()))) return false; if (ex instanceof SSLPeerUnverifiedException || @@ -319,6 +321,10 @@ public class Log { ex.getCause() instanceof CertPathValidatorException) return false; // checkUpdate! + if (ex instanceof RuntimeException && + "Illegal meta data value: the child service doesn't exist".equals(ex.getMessage())) + return false; + // Rate limit int count = prefs.getInt("crash_report_count", 0) + 1; prefs.edit().putInt("crash_report_count", count).apply();