fix: Enable orientation lock and improve webview fullscreen handling - #1171
fix: Enable orientation lock and improve webview fullscreen handling#1171HarishV14 wants to merge 1 commit into
Conversation
HarishV14
commented
Sep 4, 2026
- Set lockToLandscape = true on WebViewFragment inside FermionLiveStreamFragment to trigger landscape rotation when entering fullscreen mode.
- Prevent setting webView visibility to GONE in CustomWebChromeClient during onShowCustomView to avoid premature Chromium custom view teardown.
- Guard updateLayoutForOrientation in FermionLiveStreamFragment when isFullScreen() is active to prevent window inset changes from interrupting fullscreen playback.
- Expose isFullScreen() in WebViewFragment to check WebChromeClient state.
|
Claude finished @HarishV14's task in 3m 8s —— View job Claude finished reviewingTodo list
SummaryThis PR fixes a real fullscreen-teardown bug in the WebView (previously the underlying However, I found one crash risk worth fixing before merge. Findings🔴 Potential crash:
fun isFullScreen(): Boolean {
return (webView.webChromeClient as? CustomWebChromeClient)?.isFullScreen() == true
}
Concretely, when Suggested fix — guard against the uninitialized property: fun isFullScreen(): Boolean {
if (!::webView.isInitialized) return false
return (webView.webChromeClient as? CustomWebChromeClient)?.isFullScreen() == true
}Other observations (minor, non-blocking)
No security, threading, or architecture concerns beyond the above — the change set is small and focused. |
b21c066 to
acc6c7a
Compare
acc6c7a to
b171427
Compare