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
9 changes: 5 additions & 4 deletions AppFramework/Event/GREYTouchInjector.m
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ - (BOOL)grey_injectTouches:(GREYTouchInfo *)touchInfo
ongoingTouches:(NSMutableArray<UITouch *> *)ongoingTouches
exception:(NSException **)exception {
GREYFatalAssertMainThread();
id injectionException;

UITouchesEvent *event = [UIApplication.sharedApplication _touchesEvent];
[self grey_updateUITouchObjectsFromTouchInfo:touchInfo
ongoingTouches:ongoingTouches
Expand Down Expand Up @@ -385,12 +385,13 @@ - (BOOL)grey_injectTouches:(GREYTouchInfo *)touchInfo
@autoreleasepool {
[UIApplication.sharedApplication sendEvent:event];
}
} @catch (id exception) {
injectionException = exception;
} @catch (id injectionException) {
*exception = injectionException;
return false;
} @finally {
[event _setHIDEvent:NULL];
}
return !injectionException;
return true;
}

/**
Expand Down