Skip to content

Fix WebView Browser Dialer recovery after network handovers - #6229

Open
eliotcougar wants to merge 3 commits into
2dust:masterfrom
eliotcougar:fix/webview-dialer-threading
Open

eliotcougar wants to merge 3 commits into
2dust:masterfrom
eliotcougar:fix/webview-dialer-threading

Conversation

@eliotcougar

@eliotcougar eliotcougar commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #6228.

Network handovers reload the core on a worker thread. With WebView Browser Dialer enabled, stopping the existing WebView from that thread throws and aborts the dialer restart, leaving the connection broken until a manual restart.

Run WebView setup and teardown on the main looper while preserving synchronous completion and error propagation. Invalidate superseded lifecycle requests, clean up failed initialization, and ignore callbacks from destroyed views.

Validation:

  • JVM tests, including 11 dialer regressions, and Play Store debug/release builds passed.
  • Real WebView lifecycle tests passed on Android 17. Browser Dialer traffic recovered automatically across Wi-Fi ↔ cellular handovers in VPN and proxy-only modes. One VPN request was interrupted; the next succeeded without manual intervention.
  • Lint reports four pre-existing NewApi errors in unchanged files.
  • Not run: physical-device and root-mode checks; no suitable target was available.

Preserve synchronous start/stop completion and failure propagation for worker-thread network reloads. Supersede queued lifecycle requests and prevent callbacks from reviving destroyed views. Add JVM and real-WebView regression coverage for issue 2dust#6228.
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.

Failed to reconnect between networks

1 participant