Skip to content

Commit 9719e1c

Browse files
authored
Catch SQLException when doing best effort forced send in Crashlytics. (#4608)
* Catch SQLException when doing best effort forced send. * Add changelog.
1 parent 96ef850 commit 9719e1c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

firebase-crashlytics/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Unreleased
2+
* [changed] Improved crash reporting reliability for crashes that occur early in the app's
3+
lifecycle.
24

35
# 18.3.2
46
* [unchanged] Updated to accommodate the release of the updated

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/send/ReportQueue.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.google.firebase.crashlytics.internal.send;
1616

1717
import android.annotation.SuppressLint;
18+
import android.database.SQLException;
1819
import com.google.android.datatransport.Event;
1920
import com.google.android.datatransport.Priority;
2021
import com.google.android.datatransport.Transport;
@@ -128,7 +129,11 @@ public void flushScheduledReportsIfAble() {
128129
CountDownLatch latch = new CountDownLatch(1);
129130
new Thread(
130131
() -> {
131-
ForcedSender.sendBlocking(transport, Priority.HIGHEST);
132+
try {
133+
ForcedSender.sendBlocking(transport, Priority.HIGHEST);
134+
} catch (SQLException ignored) {
135+
// best effort only.
136+
}
132137
latch.countDown();
133138
})
134139
.start();

0 commit comments

Comments
 (0)