From 41a0097df8ad78974dc25c78ec202a7d7469a185 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 30 May 2024 21:50:31 +0200 Subject: [PATCH] Check for broken WebView --- app/src/main/java/eu/faircode/email/Helper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index aa229212ac..a91af07fa2 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -130,6 +130,7 @@ import androidx.preference.PreferenceManager; import androidx.recyclerview.selection.SelectionTracker; import androidx.recyclerview.widget.RecyclerView; import androidx.viewpager.widget.PagerAdapter; +import androidx.webkit.WebViewCompat; import com.google.android.material.bottomnavigation.BottomNavigationView; import com.google.android.material.snackbar.Snackbar; @@ -563,6 +564,11 @@ public class Helper { private static boolean _hasWebView(Context context) { try { + // Canary 127.0.6510.0 is broken + PackageInfo pkg = WebViewCompat.getCurrentWebViewPackage(context); + if (pkg != null && pkg.getLongVersionCode() == 651000033) + return false; + PackageManager pm = context.getPackageManager(); if (pm.hasSystemFeature(PackageManager.FEATURE_WEBVIEW)) { WebView view = new WebView(context);