Skip to content

Conversation

@Mairramer
Copy link
Contributor

@Mairramer Mairramer commented Nov 2, 2025

Fixes crash in DeviceOrientationManager caused by UnsupportedOperationException when getDisplay() is called on a null or destroyed Activity during rotation.

Fixes flutter/flutter#176613

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

Fixes a crash in `DeviceOrientationManager` that occurred when `getDisplay()` was called on a null or destroyed Activity during device rotation. This was caused by an `UnsupportedOperationException`.
@Mairramer Mairramer marked this pull request as ready for review November 3, 2025 13:13
@Mairramer Mairramer requested a review from camsim99 as a code owner November 3, 2025 13:13
Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

The change looks good to me overall. Thanks for the quick fix! But I do want to discuss the check added to getDisplay.

Mairramer and others added 3 commits November 3, 2025 12:21
Fixed a crash in DeviceOrientationManager related to Activity state during rotation.
Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

LGTM :) thanks!

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

LGTM

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 10, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 10, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Nov 10, 2025

autosubmit label was removed for flutter/packages/10342, because - The status or check suite Linux_android android_device_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Camera] UnsupportedOperationException: ProxyApiRegistrar.getDisplay crash on Android 14 with camera 0.11.2

3 participants