Skip to content

Commit

Permalink
Remove assert for unsupported SemanticsEvents (flutter#5349)
Browse files Browse the repository at this point in the history
Not all platforms are expected to handle all SemanticsEvents. Therefore, it is ok to just drop unsupported events on the floor.
  • Loading branch information
goderbauer authored May 23, 2018
1 parent 3244381 commit 47f4a2a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,6 @@ public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) {
e.getText().add((String) data.get("message"));
sendAccessibilityEvent(e);
}
default:
assert false;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,6 @@ - (BOOL)accessibilityScroll:(UIAccessibilityScrollDirection)direction {
if ([type isEqualToString:@"announce"]) {
NSString* message = annotatedEvent[@"data"][@"message"];
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, message);
} else {
NSCAssert(NO, @"Invalid event type %@", type);
}
}

Expand Down

0 comments on commit 47f4a2a

Please sign in to comment.