Repository navigation
Keep fullscreen player controls clear of system gesture area - #13965
Open
bharathan06 wants to merge 1 commit into
Open
bharathan06 wants to merge 1 commit into
bharathan06 wants to merge 1 commit into
Conversation
|
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.



What is it?
Description of the changes in your PR
playbackControlRoot) usefitsSystemWindows, so they are only padded by the navigation bar inset. With gesture navigation the system reserves a taller bottom area for its gestures (mandatorySystemGestures), which apps cannot opt out of. On my device that area is 32 dp, while the navigation bar inset is 0 dp ("Hide gesture guide bar" on) or 16 dp (off), so the seekbar sat inside it. While the controls are visible the player leaves immersive mode, so the gestures are active exactly when the seekbar can be dragged.MainPlayerUinow sets an insets listener onplaybackControlRoot: it keeps the defaultfitsSystemWindowshandling and, only in fullscreen, raises the bottom padding to at least the bottom of the mandatory system gesture inset. The listener is removed indeinitListeners(). The value comes from the system, so it adapts per device. 1 file, +22 lines, no XML changes.Before/After Screenshots/Screen Record
Before: dev build, gesture navigation, landscape fullscreen. Dragging the seekbar opens recents / switches app.
newpipe-7929-before-dev-build.mp4
After: same setup. The controls sit above the gesture area and seekbar drags work.
newpipe-7929-after-fix-landscape-drags.mp4
Before: release 0.29.1, vertical video (Short) in portrait fullscreen, gesture navigation. Dragging the seekbar opens recents / switches app.
newpipe-7929-before-portrait-short.mp4
After: vertical video (Short) in portrait fullscreen, gesture navigation.
newpipe-7929-after-fix-portrait-short-drags.mp4
Fixes the following issue(s)
Testing/QA
Devices
Steps for testing
Enable gesture navigation. Open a horizontal video, go fullscreen in landscape, pause so the controls stay visible, and drag the seekbar repeatedly. Expected: it seeks every time and never triggers the home/recents gesture (before: 7/10 drags did; after: 0/10).
Repeat with a vertical video (Short) in portrait fullscreen. Expected: same as step 1 (after: 0/10).
Repeat step 1 with "Hide gesture guide bar" turned off. Expected: same as step 1 (before, the 16 dp padding left the seekbar partly inside the 32 dp gesture area; after: 0/10).
Switch to 3-button navigation and repeat steps 1–2. Expected: layout identical to before.
In fullscreen, show/hide the controls ~10 times, then enter and exit fullscreen a few times. Expected: no jumping, no leftover gap under the seekbar after exiting.
In fullscreen, rotate the phone 180° to the other landscape side. Expected: the seekbar stays above the gesture area, the cutout padding moves to the new side, and drags still seek.
Regression checks: brightness/volume swipes, double-tap seek, queue panel, captions, end screen, mini player (on the emulator), and split screen with NewPipe in the bottom half (embedded player). Expected: unchanged.
newpipe-7929-after-fix-regression-overlays.mp4
On the API 23 emulator, landscape fullscreen: padding is unchanged.
Ran
./gradlew assembleContinuous lintContinuous testDebugUnitTest(155/155 tests, lint unchanged) andconnectedCheckon API 35 and API 23 (25/25) locally.Known older behaviour, not changed here: when entering fullscreen with a vertical video via the rotation button, the controls are shown before the new insets arrive, so they can visibly move up. This also happens without this change wherever the bottom padding is non-zero (e.g. 3-button navigation in portrait). Related: #4040 (closed).
APK for testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence
I tried implementing the fix on my own, then got assistance from Claude. I reviewed the changes line by line, verified the root cause on my device, and tested for regressions.