Skip to content

fix: fullscreen button did nothing in portrait on large screens#77

Open
4in4in wants to merge 1 commit into
InfinityLoop1308:devfrom
4in4in:fix/fullscreen-large-screens
Open

fix: fullscreen button did nothing in portrait on large screens#77
4in4in wants to merge 1 commit into
InfinityLoop1308:devfrom
4in4in:fix/fullscreen-large-screens

Conversation

@4in4in

@4in4in 4in4in commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

On large screens (unfolded foldables, tablets) the player's fullscreen button did nothing in portrait orientation — it only started working after physically rotating the device to landscape. Reproduced on a Galaxy Fold 6 (inner screen), both with tablet mode enabled and disabled.

Problem

The fullscreen button handler (VideoDetailFragment.onScreenRotationButtonClicked()) only toggles fullscreen directly on tablets when auto-rotate is enabled or the device is already in landscape. In every other case it calls activity.setRequestedOrientation(SENSOR_LANDSCAPE) and relies on the resulting rotation to enter fullscreen.

Since Android 12L, device manufacturers can configure devices to ignore setRequestedOrientation() on large screens (see Device compatibility mode); Samsung enables this on the Fold's inner display. And since Android 16, for apps targeting SDK 36 this is guaranteed platform behavior on displays with smallest width >= 600dp: orientation restrictions, including setRequestedOrientation(), are ignored (also announced in the Android Developers blog). PipePipe targets SDK 36, so on the unfolded Fold the call is silently ignored, without any error, and the button appears dead:

  • tablet mode, portrait, system auto-rotate off → rotation request ignored → nothing happens;
  • tablet mode off, portrait → same phone code path → same result;
  • landscape works, because there the tablet branch toggles fullscreen directly.

Changes

Phones and pre-12L tablets keep the existing behavior (the new check returns false there); the folded cover screen (below sw600dp) also behaves as before.

Validation

  • ./gradlew assembleDebug in PipePipeClient.
  • Tested on a real Galaxy Fold 6:
    • unfolded, portrait, system auto-rotate off, tablet mode auto and off → the button now enters/exits fullscreen;
    • unfolded, landscape → unchanged;
    • cover screen (phone layout) → unchanged, the button still rotates to landscape.

Android 12L+ devices with sw >= 600dp (tablets, unfolded foldables like
Galaxy Fold) ignore setRequestedOrientation(), so the screen rotation
button silently failed when it tried to rotate to landscape instead of
toggling fullscreen. Detect this case and toggle fullscreen directly,
and skip the auto exit-fullscreen paths that rely on forced rotation.
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.

1 participant