mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Remove assert for unsupported SemanticsEvents (#5349)
Not all platforms are expected to handle all SemanticsEvents. Therefore, it is ok to just drop unsupported events on the floor.
This commit is contained in:
parent
32443810e7
commit
47f4a2aad4
@ -691,8 +691,6 @@ class AccessibilityBridge extends AccessibilityNodeProvider implements BasicMess
|
||||
e.getText().add((String) data.get("message"));
|
||||
sendAccessibilityEvent(e);
|
||||
}
|
||||
default:
|
||||
assert false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -614,8 +614,6 @@ void AccessibilityBridge::HandleEvent(NSDictionary<NSString*, id>* annotatedEven
|
||||
if ([type isEqualToString:@"announce"]) {
|
||||
NSString* message = annotatedEvent[@"data"][@"message"];
|
||||
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, message);
|
||||
} else {
|
||||
NSCAssert(NO, @"Invalid event type %@", type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user