Skip to content

fix: handle device rotations from before app start#309

Open
PhilLab wants to merge 1 commit into
FossifyOrg:mainfrom
PhilLab:ph/fix_pre_start_rotations
Open

fix: handle device rotations from before app start#309
PhilLab wants to merge 1 commit into
FossifyOrg:mainfrom
PhilLab:ph/fix_pre_start_rotations

Conversation

@PhilLab
Copy link
Copy Markdown

@PhilLab PhilLab commented Jun 7, 2026

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

Previously, both images and videos where stored with the wrong orientation if you had rotated the phone to landscape before opening the app. Only rotations while the camera app is open were handled by the listener.

The target rotation also needs to be applied immediately at bind time, to correctly react to rotations that happened before the app lifecycle.

The commit also addresses linter warnings in the same file. I figured they are too small to justify a separate PR, but let me know if they shall be removed again.

Tests performed

  • Tested on emulator and Pixel 10 physical device

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

Previously, both images and videos where stored with the wrong orientation
if you had rotated the phone to landscape before opening the app. Only
rotations while the camera app is open were handled by the listener.

The target rotation also needs to be applied immediately at bind time, to
correctly react to rotations that happened before the app lifecycle.
@PhilLab PhilLab requested a review from naveensingh as a code owner June 7, 2026 12:32
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.

Rotating the phone before opening app leads to wrongly oriented photos and videos

1 participant