mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-03 15:46:34 +02:00
Disable attribute registration
This commit is contained in:
@@ -99,6 +99,8 @@ public class ActivityAMP extends ActivityBase {
|
||||
|
||||
if (WebViewEx.isFeatureSupported(this, WebViewFeature.SAFE_BROWSING_ENABLE))
|
||||
WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing);
|
||||
if (WebViewEx.isFeatureSupported(this, WebViewFeature.ATTRIBUTION_REGISTRATION_BEHAVIOR))
|
||||
WebSettingsCompat.setAttributionRegistrationBehavior(settings, WebSettingsCompat.ATTRIBUTION_BEHAVIOR_DISABLED);
|
||||
|
||||
setDarkMode();
|
||||
|
||||
|
||||
@@ -116,6 +116,9 @@ public class ActivityCode extends ActivityBase {
|
||||
settings.setCacheMode(WebSettings.LOAD_CACHE_ONLY);
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_NEVER_ALLOW);
|
||||
|
||||
if (WebViewEx.isFeatureSupported(this, WebViewFeature.ATTRIBUTION_REGISTRATION_BEHAVIOR))
|
||||
WebSettingsCompat.setAttributionRegistrationBehavior(settings, WebSettingsCompat.ATTRIBUTION_BEHAVIOR_DISABLED);
|
||||
|
||||
settings.setLoadsImagesAutomatically(false);
|
||||
settings.setBlockNetworkLoads(true);
|
||||
settings.setBlockNetworkImage(true);
|
||||
|
||||
@@ -82,6 +82,8 @@ public class FragmentDialogOpenFull extends FragmentDialogBase {
|
||||
|
||||
if (WebViewEx.isFeatureSupported(context, WebViewFeature.SAFE_BROWSING_ENABLE))
|
||||
WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing);
|
||||
if (WebViewEx.isFeatureSupported(context, WebViewFeature.ATTRIBUTION_REGISTRATION_BEHAVIOR))
|
||||
WebSettingsCompat.setAttributionRegistrationBehavior(settings, WebSettingsCompat.ATTRIBUTION_BEHAVIOR_DISABLED);
|
||||
|
||||
boolean dark = (Helper.isDarkTheme(context) && !force_light);
|
||||
boolean canDarken = WebViewEx.isFeatureSupported(context, WebViewFeature.ALGORITHMIC_DARKENING);
|
||||
|
||||
@@ -46,6 +46,8 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.webkit.WebSettingsCompat;
|
||||
import androidx.webkit.WebViewFeature;
|
||||
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
@@ -389,6 +391,10 @@ public class FragmentDialogPrint extends FragmentDialogBase {
|
||||
settings.setUserAgentString(WebViewEx.getUserAgent(context, printWebView));
|
||||
settings.setLoadsImagesAutomatically(print_html_images);
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
|
||||
if (WebViewEx.isFeatureSupported(context, WebViewFeature.ATTRIBUTION_REGISTRATION_BEHAVIOR))
|
||||
WebSettingsCompat.setAttributionRegistrationBehavior(settings, WebSettingsCompat.ATTRIBUTION_BEHAVIOR_DISABLED);
|
||||
|
||||
settings.setJavaScriptEnabled(false);
|
||||
settings.setAllowFileAccess(true);
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
||||
|
||||
if (WebViewEx.isFeatureSupported(context, WebViewFeature.SAFE_BROWSING_ENABLE))
|
||||
WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing);
|
||||
if (WebViewEx.isFeatureSupported(context, WebViewFeature.ATTRIBUTION_REGISTRATION_BEHAVIOR))
|
||||
WebSettingsCompat.setAttributionRegistrationBehavior(settings, WebSettingsCompat.ATTRIBUTION_BEHAVIOR_DISABLED);
|
||||
}
|
||||
|
||||
void init(int height, int maxHeight, float size, Pair<Integer, Integer> position, boolean force_light, IWebView intf) {
|
||||
|
||||
Reference in New Issue
Block a user