use of com.google.firebase.crashlytics.internal.model.CrashlyticsReport in project firebase-android-sdk by firebase.
the class CrashlyticsReportDataCaptureTest method testCaptureReport_containsUnityVersionInDeveloperPlatformFieldsWhenAvailable.
@Test
public void testCaptureReport_containsUnityVersionInDeveloperPlatformFieldsWhenAvailable() throws Exception {
final String expectedUnityVersion = "1.0.0";
when(developmentPlatformProvider.getDevelopmentPlatform()).thenReturn(UNITY_PLATFORM);
when(developmentPlatformProvider.getDevelopmentPlatformVersion()).thenReturn(expectedUnityVersion);
initDataCapture();
final CrashlyticsReport report = dataCapture.captureReportData("sessionId", 0);
assertNotNull(report.getSession());
assertEquals(UNITY_PLATFORM, report.getSession().getApp().getDevelopmentPlatform());
assertEquals(expectedUnityVersion, report.getSession().getApp().getDevelopmentPlatformVersion());
}
use of com.google.firebase.crashlytics.internal.model.CrashlyticsReport 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;
}
use of com.google.firebase.crashlytics.internal.model.CrashlyticsReport in project GreenHouse by utsanjan.
the class SessionReportingCoordinator method onBeginSession.
// com.google.firebase.crashlytics.internal.common.CrashlyticsLifecycleEvents
@Override
public void onBeginSession(String sessionId, long timestamp) {
this.currentSessionId = sessionId;
CrashlyticsReport capturedReport = this.dataCapture.captureReportData(sessionId, timestamp);
this.reportPersistence.persistReport(capturedReport);
}
use of com.google.firebase.crashlytics.internal.model.CrashlyticsReport in project GreenHouse by utsanjan.
the class AutoValue_CrashlyticsReport method equals.
public boolean equals(Object o) {
CrashlyticsReport.Session session;
if (o == this) {
return true;
}
if (!(o instanceof CrashlyticsReport)) {
return false;
}
CrashlyticsReport that = (CrashlyticsReport) o;
if (this.sdkVersion.equals(that.getSdkVersion()) && this.gmpAppId.equals(that.getGmpAppId()) && this.platform == that.getPlatform() && this.installationUuid.equals(that.getInstallationUuid()) && this.buildVersion.equals(that.getBuildVersion()) && this.displayVersion.equals(that.getDisplayVersion()) && ((session = this.session) != null ? session.equals(that.getSession()) : that.getSession() == null)) {
CrashlyticsReport.FilesPayload filesPayload = this.ndkPayload;
if (filesPayload == null) {
if (that.getNdkPayload() == null) {
return true;
}
} else if (filesPayload.equals(that.getNdkPayload())) {
return true;
}
}
return false;
}
Aggregations