Repository navigation
fix(orientation): let tablets rotate outside the full player - #807
Closed
kevenchantre wants to merge 8 commits into
Closed
kevenchantre wants to merge 8 commits into
kevenchantre wants to merge 8 commits into
Conversation
… document URI
When the download result carried no file name, the converted name was taken from the last segment of the SAF
content URI, i.e. the percent-encoded document id ('primary%3AMusic%2FAlbum%2FSong.opus'). The name is now the
part of the document id after the last '/' and ':' ('Song.opus'). Regular file paths are unchanged.
Every page except the full player was locked to portrait on all touch devices, so a tablet held in landscape turned back to portrait when the player closed. The layouts already adapt to wide screens. Tablets (a display whose shorter side is at least 600 logical pixels, judged by the display so split screen does not change it) now allow every orientation on every page. Android's MainActivity applies the same rule at launch, before Flutter takes over. Phones keep portrait pages with a rotating full player, and TV stays landscape. Fixes mornyeapp#805
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.
Summary
Every page except the full player was locked to portrait on all touch devices, so a tablet held in landscape turned back to portrait as soon as the player closed (#805, reported on a Redmi Pad 2). The comment on
setAppOrientationalready said only phones should behave this way, and the layouts already adapt to wide screens.sw600dp). This is judged by the display rather than the window, so split screen and resizing don't change it.MainActivity.onCreateapplies the same rule at launch (SCREEN_ORIENTATION_FULL_USERwhensmallestScreenWidthDp >= 600, which respects the system rotation lock), so a tablet held in landscape no longer flips to portrait before Flutter takes over.Related Issues
Fixes #805
Type of Change
Validation
dart format --output=none --set-exit-if-changed lib test integration_testflutter analyzeflutter testbash scripts/check_rust_backend.shValidation notes:
test/app_orientation_test.dartpasses (9 tests). New cases: tablets rotate on every page and in the player; tablets keep rotating after the player closes; a TV is never treated as a tablet; the 600 dp display threshold classifies a phone in both orientations and two tablet sizes correctly. Existing phone and TV cases are unchanged.Contributor Checklist