src/main/java/org/acra/ErrorReporter.java
/**
     * Delete pending reports.
     * 
     * @param deleteApprovedReports
     *            Set to true to delete approved and silent reports.
     * @param deleteNonApprovedReports
     *            Set to true to delete non approved/silent reports.
     * @param nbOfLatestToKeep
     *            Number of pending reports to retain.
     */
Delete pending reports.

@param deleteApprovedReports
Set to true to delete approved and silent reports.
@param deleteNonApprovedReports
Set to true to delete non approved/silent reports.
@param nbOfLatestToKeep
Number of pending reports to retain.
Delete pending reports . @param deleteApprovedReports Set to true to delete approved and silent reports . @param deleteNonApprovedReports Set to true to delete non approved / silent reports . @param nbOfLatestToKeep Number of pending reports to retain .
private void deletePendingReports(boolean deleteApprovedReports, boolean deleteNonApprovedReports,
            int nbOfLatestToKeep) {
        final CrashReportFinder reportFinder = new CrashReportFinder(mContext);
        final String[] filesList = reportFinder.getCrashReportFiles();
        Arrays.sort(filesList);
        if (filesList != null) {
            for (int iFile = 0; iFile < filesList.length - nbOfLatestToKeep; iFile++) {
                final String fileName = filesList[iFile];
                final boolean isReportApproved = fileNameParser.isApproved(fileName);
                if ((isReportApproved && deleteApprovedReports) || (!isReportApproved && deleteNonApprovedReports)) {
                    final File fileToDelete = new File(mContext.getFilesDir(), fileName);
                    if (!fileToDelete.delete()) {
                        Log.e(ACRA.LOG_TAG, "Could not delete report : " + fileToDelete);
                    }
                }
            }
        }
    }
private void deletePendingReports ( boolean deleteApprovedReports , boolean deleteNonApprovedReports , int nbOfLatestToKeep ) { final CrashReportFinder reportFinder = new CrashReportFinder ( mContext ) ; final String [ ] filesList = reportFinder . getCrashReportFiles ( ) ; Arrays . sort ( filesList ) ; if ( filesList != null ) { for ( int iFile = 0 ; iFile < filesList . length - nbOfLatestToKeep ; iFile ++ ) { final String fileName = filesList [ iFile ] ; final boolean isReportApproved = fileNameParser . isApproved ( fileName ) ; if ( ( isReportApproved && deleteApprovedReports ) || ( ! isReportApproved && deleteNonApprovedReports ) ) { final File fileToDelete = new File ( mContext . getFilesDir ( ) , fileName ) ; if ( ! fileToDelete . delete ( ) ) { Log . e ( ACRA . LOG_TAG , "Could not delete report : " + fileToDelete ) ; } } } } }
Delete pending reports.
Delete pending reports .
// TODO Check logic and instances where nbOfLatestToKeep = X, because
 // that might stop us from deleting any reports.
