Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Always set orientation preferences on iOS 16+ #40953

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Apr 5, 2023

Cherry-pick #38230 onto stable.

CP request at flutter/flutter#124208.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

}
UIWindowSceneGeometryPreferencesIOS* preference =
[[UIWindowSceneGeometryPreferencesIOS alloc]
initWithInterfaceOrientations:_orientationPreferences];
Copy link
Contributor

@cyanglaz cyanglaz Apr 5, 2023

Choose a reason for hiding this comment

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

autorelease]

The old code also wasn't releasing the preference object.

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually recently caught this on the master branch in Instruments when I was looking at leaks, but I forgot to fix it there. I know it seems dumb but let's keep this matching #38230 with the leak since that's been baking awhile and we know it doesn't crash. This is a really tiny leak and I'll fix in master now 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

im surprised that it doesn't have a windowSceneGeometryPreferencesIOSWithInterfaceOrientations: method

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a really tiny leak and I'll fix in master now

#40957

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM

@itsjustkevin
Copy link
Contributor

@XilaiZhang did we move these web engine checks to post-submit?

@XilaiZhang
Copy link
Contributor

@XilaiZhang did we move these web engine checks to post-submit?

Looks like these targets have been removed from the .ci.yaml file on main branch, so they are pending. should be ready to merge

@itsjustkevin itsjustkevin merged commit b61943d into flutter:flutter-3.7-candidate.1 Apr 6, 2023
@jmagman jmagman deleted the rotate branch April 13, 2023 20:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants