Filter exceptions

This commit is contained in:
M66B 2020-02-09 14:23:41 +01:00
parent cde31f2901
commit ac36f1b228
1 changed files with 8 additions and 2 deletions

View File

@ -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();