mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-27 08:01:50 +01:00
Improved WebView test
This commit is contained in:
@@ -44,6 +44,7 @@ import android.text.TextUtils;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
@@ -861,6 +862,19 @@ public class Helper {
|
||||
}
|
||||
}
|
||||
|
||||
static boolean hasWebView(Context context) {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
if (pm.hasSystemFeature("android.software.webview"))
|
||||
try {
|
||||
new WebView(context);
|
||||
return true;
|
||||
} catch (Throwable ex) {
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getFingerprint(Context context) {
|
||||
try {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
|
||||
Reference in New Issue
Block a user