Skip to content

Commit 920e2d3

Browse files
committed
Do not report OutOfMemoryError to Crashlytics
1 parent 5b29e25 commit 920e2d3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/src/main/kotlin/com/njlabs/showjava/utils/logging/ProductionTree.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ class ProductionTree : Timber.Tree() {
3232
return
3333
}
3434

35-
if (message.isNotEmpty()) {
36-
Crashlytics.log("[$tag] $message")
37-
}
38-
39-
if (t !== null) {
35+
if (t !== null && t !is OutOfMemoryError) {
36+
if (message.isNotEmpty()) {
37+
Crashlytics.log("[$tag] $message")
38+
}
4039
Crashlytics.logException(t)
40+
return
4141
}
4242

4343
if (priority > Log.WARN) {

0 commit comments

Comments
 (0)