Add an else case where crash logs are null means there is no crash (#4506)

This commit is contained in:
neslihanturan 2021-07-14 18:05:04 +03:00 committed by GitHub
parent 8793d45f30
commit ec89a3377a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,7 @@
package fr.free.nrw.commons.logging; package fr.free.nrw.commons.logging;
import static org.acra.ACRA.getErrorReporter;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
@ -62,6 +64,8 @@ public abstract class LogsSender implements ReportSender {
final Uri logFileUri = getZippedLogFileUri(context, report); final Uri logFileUri = getZippedLogFileUri(context, report);
if (logFileUri != null) { if (logFileUri != null) {
sendEmail(context, logFileUri); sendEmail(context, logFileUri);
} else {
getErrorReporter().handleSilentException(null);
} }
} }