Repository navigation
iOS: tell UIKit when unlockOrientation() changes the supported mask (#6089) - #6093
Conversation
…6089) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 176 screenshots: 176 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
|
Compared 236 screenshots: 236 matched. |
|
Compared 175 screenshots: 175 matched. Benchmark Results
Detailed Performance Metrics
|
|
Compared 171 screenshots: 171 matched. |
|
Compared 176 screenshots: 176 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
|
Compared 179 screenshots: 179 matched. Benchmark Results
Detailed Performance Metrics
ParparVM vs HotSpot (JDK 25): macOS arm64Runner CPU: Apple M1 (Virtual) (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
Fixes #6089.
unlockOrientation()only resetorientationLock. Since iOS 16 UIKit caches the root controller'ssupportedInterfaceOrientationsand re-reads it only when asked, so after a lock (here, one held across the native camera as a workaround for #6080) autorotation stayed off until the app was restarted.Fix
On the main queue, unlock now calls
setNeedsUpdateOfSupportedInterfaceOrientationson the root controller. When no native modal is presented, it also asks the window scene to rotate to the physical device orientation, provided both the controller and the app allow it. Before iOS 16 it callsattemptRotationToDeviceOrientation. While a modal is up, only the invalidation is sent: the modal owns the orientation, and UIKit re-reads the root mask when the modal is dismissed.Test
No automated test. A simulator can't physically rotate after an unlock, so the existing
NativeModalRotationTestpath can't observe this. It needs a check on a physical device using the reproducer attached to #6089.🤖 Generated with Claude Code