Check if safe browsing can be enabled

pull/194/merge
M66B 3 years ago
parent db553478f4
commit 400c135530

@ -102,8 +102,8 @@ public class ActivityAMP extends ActivityBase {
settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) if (WebViewEx.isFeatureSupported(WebViewFeature.SAFE_BROWSING_ENABLE))
settings.setSafeBrowsingEnabled(safe_browsing); WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing);
setDarkMode(); setDarkMode();

@ -82,8 +82,8 @@ public class FragmentDialogOpenFull extends FragmentDialogBase {
settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) if (WebViewEx.isFeatureSupported(WebViewFeature.SAFE_BROWSING_ENABLE))
settings.setSafeBrowsingEnabled(safe_browsing); WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing);
boolean dark = (Helper.isDarkTheme(context) && !force_light); boolean dark = (Helper.isDarkTheme(context) && !force_light);
if (WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK)) if (WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK))

Loading…
Cancel
Save