mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 09:16:00 +00:00
Removed extra WebView check
This commit is contained in:
parent
fb579d0d07
commit
b18bf94eff
2 changed files with 4 additions and 8 deletions
|
@ -518,9 +518,10 @@ public class DebugHelper {
|
||||||
WebViewEx.isFeatureSupported(context, WebViewFeature.ALGORITHMIC_DARKENING)));
|
WebViewEx.isFeatureSupported(context, WebViewFeature.ALGORITHMIC_DARKENING)));
|
||||||
try {
|
try {
|
||||||
PackageInfo pkg = WebViewCompat.getCurrentWebViewPackage(context);
|
PackageInfo pkg = WebViewCompat.getCurrentWebViewPackage(context);
|
||||||
sb.append(String.format("WebView %d/%s\r\n",
|
sb.append(String.format("WebView %d/%s has=%b\r\n",
|
||||||
pkg == null ? -1 : pkg.versionCode,
|
pkg == null ? -1 : pkg.versionCode,
|
||||||
pkg == null ? null : pkg.versionName));
|
pkg == null ? null : pkg.versionName,
|
||||||
|
Helper.hasWebView(context)));
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
sb.append(ex).append("\r\n");
|
sb.append(ex).append("\r\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,6 @@ import androidx.preference.PreferenceManager;
|
||||||
import androidx.recyclerview.selection.SelectionTracker;
|
import androidx.recyclerview.selection.SelectionTracker;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.viewpager.widget.PagerAdapter;
|
import androidx.viewpager.widget.PagerAdapter;
|
||||||
import androidx.webkit.WebViewCompat;
|
|
||||||
|
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
@ -568,11 +567,6 @@ public class Helper {
|
||||||
|
|
||||||
private static boolean _hasWebView(Context context) {
|
private static boolean _hasWebView(Context context) {
|
||||||
try {
|
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();
|
PackageManager pm = context.getPackageManager();
|
||||||
if (pm.hasSystemFeature(PackageManager.FEATURE_WEBVIEW)) {
|
if (pm.hasSystemFeature(PackageManager.FEATURE_WEBVIEW)) {
|
||||||
WebView view = new WebView(context);
|
WebView view = new WebView(context);
|
||||||
|
@ -581,6 +575,7 @@ public class Helper {
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
|
Log.w(ex);
|
||||||
/*
|
/*
|
||||||
Caused by: java.lang.RuntimeException: Package manager has died
|
Caused by: java.lang.RuntimeException: Package manager has died
|
||||||
at android.app.ApplicationPackageManager.hasSystemFeature(ApplicationPackageManager.java:414)
|
at android.app.ApplicationPackageManager.hasSystemFeature(ApplicationPackageManager.java:414)
|
||||||
|
|
Loading…
Reference in a new issue