mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Safe browsing compat
This commit is contained in:
parent
3d23ff094d
commit
e19f8448e8
2 changed files with 4 additions and 3 deletions
|
@ -53,6 +53,7 @@ import androidx.appcompat.widget.SwitchCompat;
|
|||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.webkit.WebViewFeature;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
|
@ -267,7 +268,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
|||
}
|
||||
});
|
||||
|
||||
grpSafeBrowsing.setEnabled(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O);
|
||||
grpSafeBrowsing.setEnabled(WebViewFeature.isFeatureSupported(WebViewFeature.SAFE_BROWSING_ENABLE));
|
||||
|
||||
ibDisconnectBlacklist.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -70,8 +70,8 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
|||
settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
settings.setSafeBrowsingEnabled(safe_browsing);
|
||||
if (WebViewFeature.isFeatureSupported(WebViewFeature.SAFE_BROWSING_ENABLE))
|
||||
WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing);
|
||||
|
||||
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK))
|
||||
WebSettingsCompat.setForceDark(settings,
|
||||
|
|
Loading…
Reference in a new issue