Landscape orientation.

This commit is contained in:
Matthew Chen 2019-01-09 14:32:52 -05:00
parent b668237e80
commit 2ddde368ec
3 changed files with 19 additions and 0 deletions

View file

@ -957,6 +957,15 @@ static NSTimeInterval launchStartedAt;
return UIInterfaceOrientationMaskAllButUpsideDown;
}
if (![self.windowManager isAppWindow:window]) {
// iOS uses various windows for animations, transitions, etc.
// e.g. _UIInteractiveHighlightEffectWindow,
// UITextEffectsWindow.
//
// We should be permissive with these windows.
return UIInterfaceOrientationMaskAllButUpsideDown;
}
if (window == self.windowManager.menuActionsWindow) {
return UIInterfaceOrientationMaskAllButUpsideDown;
}

View file

@ -31,6 +31,8 @@ extern const UIWindowLevel UIWindowLevel_Background;
- (void)setIsScreenBlockActive:(BOOL)isScreenBlockActive;
- (BOOL)isAppWindow:(UIWindow *)window;
#pragma mark - Message Actions
@property (nonatomic, readonly) BOOL isPresentingMenuActions;

View file

@ -310,6 +310,14 @@ const UIWindowLevel UIWindowLevel_MessageActions(void)
[self ensureWindowState];
}
- (BOOL)isAppWindow:(UIWindow *)window
{
OWSAssertDebug(window);
return (window == self.rootWindow || window == self.returnToCallWindow || window == self.callViewWindow
|| window == self.menuActionsWindow || window == self.screenBlockingWindow);
}
#pragma mark - Message Actions
- (BOOL)isPresentingMenuActions