src/main/java/org/acra/SendWorker.java
/**
     * Flag all pending reports as "approved" by the user. These reports can be sent.
     */
Flag all pending reports as "approved" by the user. These reports can be sent.
Flag all pending reports as " approved " by the user . These reports can be sent .
private void approvePendingReports() {
        Log.d(LOG_TAG, "Mark all pending reports as approved.");
        final CrashReportFinder reportFinder = new CrashReportFinder(context);
        final String[] reportFileNames = reportFinder.getCrashReportFiles();
        for (String reportFileName : reportFileNames) {
            if (!fileNameParser.isApproved(reportFileName)) {
                final File reportFile = new File(context.getFilesDir(), reportFileName);
                final String newName = reportFileName.replace(ACRAConstants.REPORTFILE_EXTENSION, ACRAConstants.APPROVED_SUFFIX + ACRAConstants.REPORTFILE_EXTENSION);
                final File newFile = new File(context.getFilesDir(), newName);
                if (!reportFile.renameTo(newFile)) {
                    Log.e(LOG_TAG, "Could not rename approved report from " + reportFile + " to " + newFile);
                }
            }
        }
    }
private void approvePendingReports ( ) { Log . d ( LOG_TAG , "Mark all pending reports as approved." ) ; final CrashReportFinder reportFinder = new CrashReportFinder ( context ) ; final String [ ] reportFileNames = reportFinder . getCrashReportFiles ( ) ; for ( String reportFileName : reportFileNames ) { if ( ! fileNameParser . isApproved ( reportFileName ) ) { final File reportFile = new File ( context . getFilesDir ( ) , reportFileName ) ; final String newName = reportFileName . replace ( ACRAConstants . REPORTFILE_EXTENSION , ACRAConstants . APPROVED_SUFFIX + ACRAConstants . REPORTFILE_EXTENSION ) ; final File newFile = new File ( context . getFilesDir ( ) , newName ) ; if ( ! reportFile . renameTo ( newFile ) ) { Log . e ( LOG_TAG , "Could not rename approved report from " + reportFile + " to " + newFile ) ; } } } }
Flag all pending reports as "approved" by the user.
Flag all pending reports as " approved " by the user .
// TODO look into how this could cause a file to go from -approved.stacktrace to -approved-approved.stacktrace
 // TODO Look into whether rename is atomic. Is there a better option?
