Landscape orientation.

pull/1/head
Matthew Chen 6 years ago
parent b668237e80
commit 2ddde368ec

@ -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;
}

@ -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;

@ -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

Loading…
Cancel
Save