use of com.google.firebase.crashlytics.internal.common.CrashlyticsReportWithSessionId in project GreenHouse by utsanjan.
the class CrashlyticsReportPersistence method loadFinalizedReports.
public List<CrashlyticsReportWithSessionId> loadFinalizedReports() {
List<File> allReportFiles = getAllFinalizedReportFiles();
ArrayList<CrashlyticsReportWithSessionId> allReports = new ArrayList<>();
allReports.ensureCapacity(allReportFiles.size());
for (File reportFile : getAllFinalizedReportFiles()) {
try {
CrashlyticsReport jsonReport = TRANSFORM.reportFromJson(readTextFile(reportFile));
allReports.add(CrashlyticsReportWithSessionId.create(jsonReport, reportFile.getName()));
} catch (IOException e) {
Logger logger = Logger.getLogger();
logger.d("Could not load report file " + reportFile + "; deleting", e);
reportFile.delete();
}
}
return allReports;
}
Aggregations