Enable fake dark by default

This commit is contained in:
M66B
2022-07-04 12:09:00 +02:00
parent 85939442f0
commit 972b12dbe3
4 changed files with 11 additions and 9 deletions

View File

@@ -387,11 +387,12 @@ 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 (BuildConfig.DEBUG) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean fake_dark = prefs.getBoolean("fake_dark", true);
if (fake_dark)
return false;
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
return false;