Skip to content

fix: prevent WebView from navigating away from privacy policy and handle URL schemes - #5068

Merged
jesmrec merged 2 commits into
masterfrom
fix/privacy_policy_webview_url_handling
Dec 2, 2026
Merged

jesmrec merged 2 commits into
masterfrom
fix/privacy_policy_webview_url_handling

Conversation

@jesmrec

@jesmrec jesmrec commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Related Issues

App: #5065

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

QA

@jesmrec
jesmrec force-pushed the fix/privacy_policy_webview_url_handling branch from 103fb5e to 4ee4382 Compare November 30, 2026 13:47
@jesmrec
jesmrec marked this pull request as ready for review November 30, 2026 16:52
@jesmrec
jesmrec requested a review from a team as a code owner November 30, 2026 16:52

@joragua joragua left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @jesmrec! Just two comments and it's ready 🙌🏻

@joragua joragua changed the title fix: privacy policy webview url handling fix: prevent WebView from navigating away from privacy policy and handle URL schemes Dec 1, 2026

@joragua joragua left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving it to QA 🚀

@jesmrec

jesmrec commented Dec 2, 2026 •

Copy link
Copy Markdown
Member Author

QA checks

  • Open Settings → Privacy Policy: correctly displayed
  • Open sidebar menu → Privacy Policy: correctly displayed
  • Tap any link inside the loaded privacy policy page → opens in browser and privacy policy stays in app
  • If the page contains a mailto: link, tap it → email client should open
  • If no app is installed to handle a given URL scheme, confirm a Snackbar with the "no app to perform action" message appears. Tested with data:text/html,<a href="owncloud-noapp://test">Tap me</a>
  • If R.string.url_privacy_policy ends in .pdf (or test against a flavor configured this way), opening Privacy Policy from Settings should open it directly in a browser, not the WebView activity. Tested with https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf
  • Press the back button (hardware or gesture) from Privacy Policy → returns to Settings
  • Tap the toolbar back arrow (←) → returns to Settings
  • Test on Android 9 (API 28, min SDK) — the deprecated onReceivedError(view, errorCode, description, failingUrl) is gone; confirm the new signature fires and shows a Snackbar on error

@jesmrec

jesmrec commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

Approved on my side

…dle URL schemes

Signed-off-by: Jesus Recio <jrecio@izertis.com>
Signed-off-by: Jesus Recio <jrecio@izertis.com>
@jesmrec
jesmrec force-pushed the fix/privacy_policy_webview_url_handling branch from 4ee4382 to 032c6b4 Compare December 2, 2026 08:39
@jesmrec
jesmrec merged commit 33ae504 into master Dec 2, 2026
12 checks passed
@jesmrec
jesmrec deleted the fix/privacy_policy_webview_url_handling branch December 2, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] PrivacyPolicyActivity WebView does not route non http(s) links out of the WebView

2 participants