Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions TestLib/EarlGreyImpl/EarlGreyImpl.m
Original file line number Diff line number Diff line change
Expand Up @@ -265,22 +265,21 @@ - (void)setRootMatcherForSubsequentInteractions:(nullable id<GREYMatcher>)rootWi

#if TARGET_OS_IOS

- (BOOL)rotateInterfaceToOrientation:(UIInterfaceOrientation)interfaceOrientation
error:(NSError **)error {
UIDeviceOrientation deviceOrientation =
[GREYConstants deviceOrientationForInterfaceOrientation:interfaceOrientation];
return [self rotateDeviceToOrientation:deviceOrientation error:error];
- (BOOL)rotateDeviceToOrientation:(UIDeviceOrientation)deviceOrientation
error:(NSError **)error {
UIInterfaceOrientation interfaceOrientation =
[GREYConstants interfaceOrientationForDeviceOrientation:deviceOrientation];
return [self rotateInterfaceToOrientation:interfaceOrientation error:error];
}

- (BOOL)rotateDeviceToOrientation:(UIDeviceOrientation)deviceOrientation error:(NSError **)error {
- (BOOL)rotateInterfaceToOrientation:(UIInterfaceOrientation)interfaceOrientation
error:(NSError **)error {
GREYError *syncErrorBeforeRotation;
__block GREYError *syncErrorAfterRotation;
BOOL success = NO;
__block BOOL sendOrientationChangeNotification = NO;
XCUIDevice *sharedDevice = [XCUIDevice sharedDevice];
UIDevice *currentDevice = [GREY_REMOTE_CLASS_IN_APP(UIDevice) currentDevice];
UIInterfaceOrientation interfaceOrientation =
[GREYConstants interfaceOrientationForDeviceOrientation:deviceOrientation];
if (interfaceOrientation != UIInterfaceOrientationUnknown) {

NSNotificationCenter *notificationCenter =
Expand Down