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.

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 10, 2025
@auto-submit auto-submit bot merged commit e22c523 into flutter:main Nov 10, 2025
80 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 11, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 11, 2025
flutter/packages@4cec230...7063d75

2025-11-11 31859944+LongCatIsLooong@users.noreply.github.com
[video_player_avfoundation] removes unnecessary duration and size check
before sending the initialized event (flutter/packages#9534)
2025-11-11 magder@google.com Update Android package CODEOWNERS
(flutter/packages#10386)
2025-11-11 stuartmorgan@google.com [url_launcher] Remove unused
dartHostTestHandler (flutter/packages#10324)
2025-11-11 stuartmorgan@google.com [path_provider] Remove use of
Pigeon's Dart test generator (flutter/packages#10323)
2025-11-11 stuartmorgan@google.com [image_picker] Remove use of Pigeon's
Dart test generator (flutter/packages#10320)
2025-11-11 stuartmorgan@google.com [shared_preferences] Remove use of
Pigeon's Dart test generator (flutter/packages#10325)
2025-11-10 50643541+Mairramer@users.noreply.github.com
[camera_android_camerax] Fixes crash with unsupported operation
exception (flutter/packages#10342)
2025-11-10 stuartmorgan@google.com [file_selector] Remove unused web
code (flutter/packages#10376)
2025-11-10 engine-flutter-autoroll@skia.org Manual roll Flutter from
c5e809a to 31a8481 (9 revisions) (flutter/packages#10392)
2025-11-10 danferreiradev@gmail.com [file_selector] Add
canCreateDirectories to FileDialogOptions (flutter/packages#10317)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: camera platform-android

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