Skip to content

Commit

Permalink
Merge pull request #728 from F43nd1r/silent
Browse files Browse the repository at this point in the history
Fix report files always marked as silent
  • Loading branch information
F43nd1r authored Feb 7, 2019
2 parents 3518de1 + 06639ae commit 3f8e4a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private void sendReport(@NonNull File report, boolean onlySendSilentReports) {
private File getReportFileName(@NonNull CrashReportData crashData) {
final String timestamp = crashData.getString(USER_CRASH_DATE);
final String isSilent = crashData.getString(IS_SILENT);
final String fileName = timestamp + (isSilent != null ? ACRAConstants.SILENT_SUFFIX : "") + ACRAConstants.REPORTFILE_EXTENSION;
final String fileName = timestamp + (isSilent != null && Boolean.parseBoolean(isSilent) ? ACRAConstants.SILENT_SUFFIX : "") + ACRAConstants.REPORTFILE_EXTENSION;
final ReportLocator reportLocator = new ReportLocator(context);
return new File(reportLocator.getUnapprovedFolder(), fileName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void sendReports(boolean onlySendSilentReports) {
}
final String toast;
if (anyNonSilent && (toast = reportsSentCount > 0 ? config.reportSendSuccessToast() : config.reportSendFailureToast()) != null) {
if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "About to show " + (reportsSentCount > 0 ? "success" : "failure") + " toast");
new Handler(Looper.getMainLooper()).post(() -> ToastSender.sendToast(context, toast, Toast.LENGTH_LONG));
}
} catch (Exception e) {
Expand Down

0 comments on commit 3f8e4a6

Please sign in to comment.