diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index 2deac33efb..5ff73a1267 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -37,7 +37,6 @@ import android.os.strictmode.Violation; import android.text.TextUtils; import android.util.Printer; import android.view.ContextThemeWrapper; -import android.webkit.CookieManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -273,9 +272,6 @@ public class ApplicationEx extends Application // https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture#opt-predictive FragmentManager.enablePredictiveBack(false); - if (Helper.hasWebView(this)) - CookieManager.getInstance().setAcceptCookie(false); - // https://issuetracker.google.com/issues/233525229 Log.i("Load emoji=" + load_emoji); try { diff --git a/app/src/main/java/eu/faircode/email/WebViewEx.java b/app/src/main/java/eu/faircode/email/WebViewEx.java index a40a5fd707..8eb41c6366 100644 --- a/app/src/main/java/eu/faircode/email/WebViewEx.java +++ b/app/src/main/java/eu/faircode/email/WebViewEx.java @@ -35,6 +35,7 @@ import android.view.InputDevice; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; +import android.webkit.CookieManager; import android.webkit.DownloadListener; import android.webkit.RenderProcessGoneDetail; import android.webkit.WebSettings; @@ -99,6 +100,8 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing); if (WebViewEx.isFeatureSupported(context, WebViewFeature.ATTRIBUTION_REGISTRATION_BEHAVIOR)) WebSettingsCompat.setAttributionRegistrationBehavior(settings, WebSettingsCompat.ATTRIBUTION_BEHAVIOR_DISABLED); + + CookieManager.getInstance().setAcceptCookie(false); } void init(int height, int maxHeight, float size, Pair position, boolean force_light, IWebView intf) {