mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 09:33:39 +02:00
Better WebView present test
This commit is contained in:
@@ -1513,7 +1513,9 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
||||
|
||||
this.dp24 = Math.round(24 * context.getResources().getDisplayMetrics().density);
|
||||
this.theme = prefs.getString("theme", "light");
|
||||
this.hasWebView = Helper.classExists("android.webkit.WebView");
|
||||
|
||||
PackageManager pm = context.getPackageManager();
|
||||
this.hasWebView = pm.hasSystemFeature("android.software.webview");
|
||||
}
|
||||
|
||||
private static final DiffUtil.ItemCallback<TupleMessageEx> DIFF_CALLBACK =
|
||||
|
||||
@@ -187,15 +187,6 @@ public class Helper {
|
||||
return new DecimalFormat("@@").format(bytes / Math.pow(unit, exp)) + " " + pre + "B";
|
||||
}
|
||||
|
||||
static boolean classExists(String className) {
|
||||
try {
|
||||
Class.forName(className);
|
||||
return true;
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static Address myAddress() throws UnsupportedEncodingException {
|
||||
return new InternetAddress("marcel+fairemail@faircode.eu", "FairCode");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user