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

Conversation

@josh-ksr
Copy link
Contributor

Fixes the iOS - Part of this issue: flutter/flutter#13238

on iOS, force an orientation change when setPreferredOrientations is called and the current orientation is not in the new list of preferred orientations

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@josh-ksr josh-ksr force-pushed the issue_13238_ios_bugfix branch 2 times, most recently from 27cb4d1 to d270568 Compare September 17, 2019 06:50
@josh-ksr
Copy link
Contributor Author

@googlebot I signed it!

@josh-ksr josh-ksr force-pushed the issue_13238_ios_bugfix branch from d270568 to b8be40e Compare September 18, 2019 07:26
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

I don't see anything wrong with the code per-say. It is using KVO to bypass the Apple's API, and there are at least some reports that this hack doesn't work in some situations. @xster proposed that this functionality should be behind a new method SystemChrome.forceOrientation(DeviceOrientation orientation). (flutter/flutter#13238 (comment))

I'd like to test this on device this afternoon and hear back from @xsterbefore I give it the thumbs up.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

I've tested on device and LGTM. At a minimum please add the docstring to the test or make the selector better named. I say we look past the gap in Apple's API for now and bring in this change.

@josh-ksr josh-ksr requested a review from gaaclarke September 24, 2019 07:44
@josh-ksr
Copy link
Contributor Author

josh-ksr commented Sep 24, 2019

I don't see anything wrong with the code per-say. It is using KVO to bypass the Apple's API, and there are at least some reports that this hack doesn't work in some situations.

@gaaclarke As far as I know, the case when it doesn't work is iPad with multitasking enabled, and in that case it´s not allowed/possible at all to force a specific orientation. I added some documentation about this behavior in another pull request (flutter/flutter#40743)

@gaaclarke
Copy link
Member

@josh-ksr I think you'll have to merge master in order to fix the build_and_test_linux_unopt_debug test. The API changed a bit and your PR doesn't have those changes.

@josh-ksr
Copy link
Contributor Author

@gaaclarke done, no more failing tests now

@gaaclarke gaaclarke merged commit c38ed2c into flutter:master Oct 15, 2019
@chinmaygarde
Copy link
Member

This is causing LUCI failures.

chinmaygarde added a commit that referenced this pull request Oct 16, 2019
…rent orientation is not allowed (#12295)"

This reverts commit c38ed2c.
@gaaclarke gaaclarke added CQ+1 and removed CQ+1 labels Oct 16, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 16, 2019
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Oct 16, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Oct 16, 2019
[email protected]:flutter/engine.git/compare/540fc977bb6b...5e6c005

git log 540fc97..5e6c005 --no-merges --oneline
2019-10-16 [email protected] Roll src/third_party/skia 083a75d6762c..59e72b71b5cf (1 commits) (flutter/engine#13169)
2019-10-16 [email protected] Roll src/third_party/dart 4131d3d7c4...41b65b27c2 (28 commits) (flutter/engine#13163)
2019-10-16 [email protected] Roll src/third_party/skia 7274850f96f2..083a75d6762c (1 commits) (flutter/engine#13168)
2019-10-16 [email protected] Roll fuchsia/sdk/core/linux-amd64 from 5I4Iw... to oTVah... (flutter/engine#13167)
2019-10-16 [email protected] Roll fuchsia/sdk/core/mac-amd64 from qpzUe... to KVDL4... (flutter/engine#13166)
2019-10-16 [email protected] Roll src/third_party/skia 634d15032d37..7274850f96f2 (3 commits) (flutter/engine#13165)
2019-10-16 [email protected] Move surface-based SceneBuilder implementation under surface/ (flutter/engine#13159)
2019-10-16 [email protected] Roll src/third_party/skia ba8752f37dab..634d15032d37 (2 commits) (flutter/engine#13164)
2019-10-16 [email protected] Revert "Issue 13238: on iOS, force an orientation change when the current orientation is not allowed" (flutter/engine#13160)
2019-10-15 [email protected] Roll buildroot to pull in static thread safety analysis options. (flutter/engine#13155)
2019-10-15 [email protected] Roll src/third_party/skia fb6a1abe4567..ba8752f37dab (8 commits) (flutter/engine#13156)
2019-10-15 [email protected] Make the Dart isolate constructor private. (flutter/engine#13153)
2019-10-15 [email protected] Revert "Upgrades the ICU version to 64.2 (#13123)" (flutter/engine#13146)
2019-10-15 [email protected] Issue 13238: on iOS, force an orientation change when the current orientation is not allowed (flutter/engine#12295)
2019-10-15 [email protected] Allow embedders to specify a render task runner description. (flutter/engine#13124)
2019-10-15 [email protected] Roll fuchsia/sdk/core/linux-amd64 from Jv4XM... to 5I4Iw... (flutter/engine#13150)
2019-10-15 [email protected] Roll fuchsia/sdk/core/mac-amd64 from i5xD1... to qpzUe... (flutter/engine#13149)
2019-10-15 [email protected] Roll src/third_party/dart fc933312f7..4131d3d7c4 (3 commits)
2019-10-15 [email protected] Document //flutter/runtime/dart_vm (flutter/engine#13144)
2019-10-15 [email protected] Revert "Enable/tweak web sdk source maps (#13141)" (flutter/engine#13148)
2019-10-15 [email protected] Merge the Fuchsia frontend_server build script into the new flutter_frontend_server target (flutter/engine#13145)
2019-10-15 [email protected] Add `flutter_tester` binary to the CIPD package (flutter/engine#13143)
2019-10-15 [email protected] Roll src/third_party/skia f22c57ddcc8c..fb6a1abe4567 (2 commits) (flutter/engine#13142)
2019-10-15 [email protected] Enable/tweak web sdk source maps (flutter/engine#13141)
2019-10-15 [email protected] Upgrades the ICU version to 64.2 (flutter/engine#13123)
2019-10-15 [email protected] [frontend_server] Include bytecode generation in the training run. (flutter/engine#13126)
2019-10-15 [email protected] Support empty strings and vectors in standard codec (flutter/engine#12974)
2019-10-15 [email protected] Roll src/third_party/dart 50f7ae9c5d..fc933312f7 (2 commits)
2019-10-15 [email protected] Roll src/third_party/skia 55f9cba6e2e7..f22c57ddcc8c (1 commits) (flutter/engine#13136)
2019-10-15 [email protected] Roll fuchsia/sdk/core/linux-amd64 from xRgq0... to Jv4XM... (flutter/engine#13135)
2019-10-15 [email protected] Roll fuchsia/sdk/core/mac-amd64 from Lk7iT... to i5xD1... (flutter/engine#13134)
2019-10-15 [email protected] Roll src/third_party/skia 858cf233ef71..55f9cba6e2e7 (3 commits) (flutter/engine#13133)
2019-10-15 [email protected] Roll src/third_party/dart 70a7ef3f58..50f7ae9c5d (18 commits)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
...
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
[email protected]:flutter/engine.git/compare/540fc977bb6b...5e6c005

git log 540fc97..5e6c005 --no-merges --oneline
2019-10-16 [email protected] Roll src/third_party/skia 083a75d6762c..59e72b71b5cf (1 commits) (flutter/engine#13169)
2019-10-16 [email protected] Roll src/third_party/dart 4131d3d7c4...41b65b27c2 (28 commits) (flutter/engine#13163)
2019-10-16 [email protected] Roll src/third_party/skia 7274850f96f2..083a75d6762c (1 commits) (flutter/engine#13168)
2019-10-16 [email protected] Roll fuchsia/sdk/core/linux-amd64 from 5I4Iw... to oTVah... (flutter/engine#13167)
2019-10-16 [email protected] Roll fuchsia/sdk/core/mac-amd64 from qpzUe... to KVDL4... (flutter/engine#13166)
2019-10-16 [email protected] Roll src/third_party/skia 634d15032d37..7274850f96f2 (3 commits) (flutter/engine#13165)
2019-10-16 [email protected] Move surface-based SceneBuilder implementation under surface/ (flutter/engine#13159)
2019-10-16 [email protected] Roll src/third_party/skia ba8752f37dab..634d15032d37 (2 commits) (flutter/engine#13164)
2019-10-16 [email protected] Revert "Issue 13238: on iOS, force an orientation change when the current orientation is not allowed" (flutter/engine#13160)
2019-10-15 [email protected] Roll buildroot to pull in static thread safety analysis options. (flutter/engine#13155)
2019-10-15 [email protected] Roll src/third_party/skia fb6a1abe4567..ba8752f37dab (8 commits) (flutter/engine#13156)
2019-10-15 [email protected] Make the Dart isolate constructor private. (flutter/engine#13153)
2019-10-15 [email protected] Revert "Upgrades the ICU version to 64.2 (flutter#13123)" (flutter/engine#13146)
2019-10-15 [email protected] Issue 13238: on iOS, force an orientation change when the current orientation is not allowed (flutter/engine#12295)
2019-10-15 [email protected] Allow embedders to specify a render task runner description. (flutter/engine#13124)
2019-10-15 [email protected] Roll fuchsia/sdk/core/linux-amd64 from Jv4XM... to 5I4Iw... (flutter/engine#13150)
2019-10-15 [email protected] Roll fuchsia/sdk/core/mac-amd64 from i5xD1... to qpzUe... (flutter/engine#13149)
2019-10-15 [email protected] Roll src/third_party/dart fc933312f7..4131d3d7c4 (3 commits)
2019-10-15 [email protected] Document //flutter/runtime/dart_vm (flutter/engine#13144)
2019-10-15 [email protected] Revert "Enable/tweak web sdk source maps (flutter#13141)" (flutter/engine#13148)
2019-10-15 [email protected] Merge the Fuchsia frontend_server build script into the new flutter_frontend_server target (flutter/engine#13145)
2019-10-15 [email protected] Add `flutter_tester` binary to the CIPD package (flutter/engine#13143)
2019-10-15 [email protected] Roll src/third_party/skia f22c57ddcc8c..fb6a1abe4567 (2 commits) (flutter/engine#13142)
2019-10-15 [email protected] Enable/tweak web sdk source maps (flutter/engine#13141)
2019-10-15 [email protected] Upgrades the ICU version to 64.2 (flutter/engine#13123)
2019-10-15 [email protected] [frontend_server] Include bytecode generation in the training run. (flutter/engine#13126)
2019-10-15 [email protected] Support empty strings and vectors in standard codec (flutter/engine#12974)
2019-10-15 [email protected] Roll src/third_party/dart 50f7ae9c5d..fc933312f7 (2 commits)
2019-10-15 [email protected] Roll src/third_party/skia 55f9cba6e2e7..f22c57ddcc8c (1 commits) (flutter/engine#13136)
2019-10-15 [email protected] Roll fuchsia/sdk/core/linux-amd64 from xRgq0... to Jv4XM... (flutter/engine#13135)
2019-10-15 [email protected] Roll fuchsia/sdk/core/mac-amd64 from Lk7iT... to i5xD1... (flutter/engine#13134)
2019-10-15 [email protected] Roll src/third_party/skia 858cf233ef71..55f9cba6e2e7 (3 commits) (flutter/engine#13133)
2019-10-15 [email protected] Roll src/third_party/dart 70a7ef3f58..50f7ae9c5d (18 commits)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
...
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