Skip to content

Always do not rotate screen when Android TV#12840

Merged
TobiGr merged 1 commit intoTeamNewPipe:devfrom
scola:rotate_on_androidtv_issue
Nov 28, 2025
Merged

Always do not rotate screen when Android TV#12840
TobiGr merged 1 commit intoTeamNewPipe:devfrom
scola:rotate_on_androidtv_issue

Conversation

@scola
Copy link
Contributor

@scola scola commented Nov 28, 2025

What is it?

  • Bugfix (user facing)
  • Feature (user facing) ⚠️ Your PR must target the refactor branch
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  1. Android TV, settings , tablet mode off
  2. play any video will display full screen automatically
  3. click full screen button again, screen rotated and display mess

Before/After Screenshots/Screen Record

  • Before:
image
  • After:
image

Fixes the following issue(s)

Relies on the following changes

APK 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.

I have tested my change by local build, it works

Due diligence

@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Nov 28, 2025
@TobiGr TobiGr added bug Issue is related to a bug GUI Issue is related to the graphical user interface device/software specific Issues that only happen on some devices or with some specific hardware/software Android TV Issue is related to Android TV labels Nov 28, 2025
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you. Can be merged once my comment is addressed.

Comment on lines 1903 to +1908
// In tablet user experience will be better if screen will not be rotated
// from landscape to portrait every time.
// Just turn on fullscreen mode in landscape orientation
// or portrait & unlocked global orientation
final boolean isLandscape = DeviceUtils.isLandscape(requireContext());
if (DeviceUtils.isTablet(activity)
if (DeviceUtils.isTv(activity) || DeviceUtils.isTablet(activity)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment regarding reasoning to check whether the device is a TV.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I add comment in the code or leave comment here? I also need to update comments in the code, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just add the reasoning to the comments above which explain the other conditions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've add comment, please review again,
// On Android TV screen rotation is not supported

@scola scola force-pushed the rotate_on_androidtv_issue branch from 770b8b1 to e045251 Compare November 28, 2025 09:41
@TobiGr TobiGr enabled auto-merge November 28, 2025 10:05
@TobiGr TobiGr added the player Issues related to any player (main, popup and background) label Nov 28, 2025
@TobiGr TobiGr merged commit 22dfe95 into TeamNewPipe:dev Nov 28, 2025
8 of 9 checks passed
@scola scola deleted the rotate_on_androidtv_issue branch November 28, 2025 10:24
@TobiGr
Copy link
Contributor

TobiGr commented Nov 29, 2025

Could you test #12781 and check whether this also solves the problem for you? That PR has a more general approach to fix related bugs with tablets.

@scola
Copy link
Contributor Author

scola commented Nov 30, 2025

Could you test #12781 and check whether this also solves the problem for you? That PR has a more general approach to fix related bugs with tablets.

I just tested the apk for check/CI of 12781, It also solved my issues on my android TV. Thanks

@TobiGr TobiGr mentioned this pull request Dec 21, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android TV Issue is related to Android TV bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software GUI Issue is related to the graphical user interface player Issues related to any player (main, popup and background) size/small PRs with less than 50 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Always do not rotate screen when Android TV

2 participants