Added fake dark

This commit is contained in:
M66B
2022-07-04 08:11:26 +02:00
parent 7d2f1f3cc8
commit 92e8732d6c
6 changed files with 74 additions and 28 deletions

View File

@@ -369,6 +369,11 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
public static boolean isFeatureSupported(Context context, String feature) {
if (WebViewFeature.ALGORITHMIC_DARKENING.equals(feature)) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean fake_dark = prefs.getBoolean("fake_dark", false);
if (fake_dark)
return false;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
return false;