Skip to content

fix(#605): opt the embedded WebView out of Google Safe Browsing#1349

Draft
jim-daf wants to merge 1 commit intoQuantumBadger:masterfrom
jim-daf:fix/issue-605-disable-webview-safebrowsing
Draft

fix(#605): opt the embedded WebView out of Google Safe Browsing#1349
jim-daf wants to merge 1 commit intoQuantumBadger:masterfrom
jim-daf:fix/issue-605-disable-webview-safebrowsing

Conversation

@jim-daf
Copy link
Copy Markdown

@jim-daf jim-daf commented Apr 26, 2026

Closes #605.

Background

On Android 8 and newer, every WebView request is checked against Google's Safe Browsing service unless the host application explicitly opts out. RedReader already opts out of WebView metrics, but never opted out of Safe Browsing, so each external link a user opens inside the in-app browser still leaks the URL to Google. The Android documentation lists the exact opt-out marker for this case.

Fix

Add the documented manifest meta-data right next to the existing MetricsOptOut declaration so both privacy switches stay together.

<meta-data android:name="android.webkit.WebView.MetricsOptOut" android:value="true" />

<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing" android:value="false" />

Why this is safe

  • The flag is a documented public Android API, supported on every WebView version that ships with API 26 plus.
  • It is a no-op on devices whose WebView does not yet implement Safe Browsing.
  • No Java code paths change, so behaviour for users who never open an external link is identical.

Validation

  • aapt2 dump xmltree on a built APK confirms the new meta-data lands inside <application>.
  • Tested manually by opening a link inside the in-app WebView and verifying the network trace no longer contains a request to safebrowsing.googleapis.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to disable safebrowsing from webview.

1 participant