Fix fullscreen video status bar not hiding on modern Android devices#7825
Open
brunovsiqueira wants to merge 1 commit intoduckduckgo:developfrom
Open
Fix fullscreen video status bar not hiding on modern Android devices#7825brunovsiqueira wants to merge 1 commit intoduckduckgo:developfrom
brunovsiqueira wants to merge 1 commit intoduckduckgo:developfrom
Conversation
88acb36 to
28b2c8d
Compare
...oid-design-system/design-system/src/main/java/com/duckduckgo/common/ui/DuckDuckGoActivity.kt
Show resolved
Hide resolved
28b2c8d to
4ab5819
Compare
...esign-system/design-system/src/main/java/com/duckduckgo/common/ui/view/ActivityExtensions.kt
Outdated
Show resolved
Hide resolved
4ab5819 to
dd2e605
Compare
...esign-system/design-system/src/main/java/com/duckduckgo/common/ui/view/ActivityExtensions.kt
Outdated
Show resolved
Hide resolved
dd2e605 to
cca6bc0
Compare
...oid-design-system/design-system/src/main/java/com/duckduckgo/common/ui/DuckDuckGoActivity.kt
Show resolved
Hide resolved
Use WindowInsetsController API (Android 11+) instead of deprecated systemUiVisibility flags for hiding system bars during fullscreen video. This fixes issues on devices with custom OEM skins where the status bar content would disappear but the bar itself remained visible. Track fullscreen state internally with isInFullScreenMode boolean because WindowInsetsController updates are asynchronous on API 30+. This ensures callers get the correct state immediately after toggling, preventing BrowserTabFragment.renderFullscreenMode() from incorrectly toggling fullscreen off due to stale insets state.
cca6bc0 to
82d24ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task/Issue URL: #6845
Description
This PR fixes an issue where the system status bar doesn't fully hide during fullscreen video playback on certain devices (reported on Xiaomi Pad 7 Pro with HyperOS 2.0). The status bar content would disappear but the bar itself remained visible.
Root Cause: The existing implementation uses deprecated
systemUiVisibilityflags which don't work correctly on modern Android versions (11+) with custom OEM skins.Solution:
WindowInsetsControllerAPI (Android 11+) for hiding system barsKey Changes:
WindowInsetsController.hide()BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPEsetDecorFitsSystemWindows(false)LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGESSteps to test this PR
Fullscreen Video
Backward Compatibility
UI changes
Note
Medium Risk
Updates fullscreen/immersive handling and state tracking at the base
DuckDuckGoActivitylevel, which can affect system bar visibility and layout across activities, especially with OEM-specific behavior and API-version branching.Overview
Fixes fullscreen video system bars not fully hiding on Android 11+ by reworking
DuckDuckGoActivity.toggleFullScreen()to enter/exit immersive mode viaWindowInsetsController(with legacysystemUiVisibilityflags for older APIs) and adding display cutout handling.Removes the
FragmentActivity.isFullScreen/isImmersiveModeEnabledextensions and updates browser code paths (BrowserActivity,BrowserTabFragment, and JS orientation lock checks) to rely on the activity’s internally trackedisFullScreenMode()state to avoid async insets timing issues.Written by Cursor Bugbot for commit 82d24ca. This will update automatically on new commits. Configure here.