mirror of https://github.com/M66B/FairEmail.git
Check for broken WebView
This commit is contained in:
parent
efb3b41c6d
commit
41a0097df8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue