File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
legacy/ui/legacy/src/main/java/com/fsck/k9/view Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.fsck.k9.view
22
33import android.content.Context
44import android.content.pm.PackageManager
5+ import android.os.Build
56import android.util.AttributeSet
67import android.webkit.WebView
78import com.fsck.k9.core.BuildConfig
@@ -35,7 +36,12 @@ class MessageWebView : WebView, KoinComponent {
3536
3637 configureDarkLightMode(this , config)
3738
38- setLayerType(LAYER_TYPE_HARDWARE , null )
39+ // LAYER_TYPE_HARDWARE forces the WebView into a GPU texture.
40+ // On API <= 26, BakedOpRenderer calls LOG_ALWAYS_FATAL on any GL error, aborting the process
41+ // and fatally crashing the app. API 28+'s SkiaPipeline handles these errors gracefully.
42+ if (Build .VERSION .SDK_INT > Build .VERSION_CODES .O_MR1 && isHardwareAccelerated) {
43+ setLayerType(LAYER_TYPE_HARDWARE , null )
44+ }
3945
4046 with (settings) {
4147 setSupportZoom(true )
You can’t perform that action at this time.
0 commit comments