Search in sources :

Example 1 with SessionReport

use of com.google.firebase.crashlytics.internal.report.model.SessionReport in project GreenHouse by utsanjan.

the class ReportManager method findReports.

public List<Report> findReports() {
    Logger.getLogger().d("Checking for crash reports...");
    File[] clsFiles = this.reportFilesProvider.getCompleteSessionFiles();
    File[] nativeReportFiles = this.reportFilesProvider.getNativeReportFiles();
    List<Report> reports = new LinkedList<>();
    if (clsFiles != null) {
        for (File file : clsFiles) {
            Logger.getLogger().d("Found crash report " + file.getPath());
            reports.add(new SessionReport(file));
        }
    }
    if (nativeReportFiles != null) {
        for (File dir : nativeReportFiles) {
            reports.add(new NativeSessionReport(dir));
        }
    }
    if (reports.isEmpty()) {
        Logger.getLogger().d("No reports found.");
    }
    return reports;
}
Also used : NativeSessionReport(com.google.firebase.crashlytics.internal.report.model.NativeSessionReport) SessionReport(com.google.firebase.crashlytics.internal.report.model.SessionReport) Report(com.google.firebase.crashlytics.internal.report.model.Report) NativeSessionReport(com.google.firebase.crashlytics.internal.report.model.NativeSessionReport) SessionReport(com.google.firebase.crashlytics.internal.report.model.SessionReport) File(java.io.File) NativeSessionReport(com.google.firebase.crashlytics.internal.report.model.NativeSessionReport) LinkedList(java.util.LinkedList)

Example 2 with SessionReport

use of com.google.firebase.crashlytics.internal.report.model.SessionReport in project GreenHouse by utsanjan.

the class CrashlyticsController method sendSessionReports.

/* JADX INFO: Access modifiers changed from: private */
public void sendSessionReports(AppSettingsData appSettings, boolean dataCollectionToken) throws Exception {
    File[] listCompleteSessionFiles;
    Context context = getContext();
    ReportUploader reportUploader = this.reportUploaderProvider.createReportUploader(appSettings);
    for (File finishedSessionFile : listCompleteSessionFiles()) {
        appendOrganizationIdToSessionFile(appSettings.organizationId, finishedSessionFile);
        Report report = new SessionReport(finishedSessionFile, SEND_AT_CRASHTIME_HEADER);
        this.backgroundWorker.submit(new SendReportRunnable(context, report, reportUploader, dataCollectionToken));
    }
}
Also used : Context(android.content.Context) SessionReport(com.google.firebase.crashlytics.internal.report.model.SessionReport) ReportUploader(com.google.firebase.crashlytics.internal.report.ReportUploader) SessionReport(com.google.firebase.crashlytics.internal.report.model.SessionReport) Report(com.google.firebase.crashlytics.internal.report.model.Report) File(java.io.File)

Aggregations

Report (com.google.firebase.crashlytics.internal.report.model.Report)2 SessionReport (com.google.firebase.crashlytics.internal.report.model.SessionReport)2 File (java.io.File)2 Context (android.content.Context)1 ReportUploader (com.google.firebase.crashlytics.internal.report.ReportUploader)1 NativeSessionReport (com.google.firebase.crashlytics.internal.report.model.NativeSessionReport)1 LinkedList (java.util.LinkedList)1