diff --git a/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java b/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java index b657aafb8e..62e0fbfc8e 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java @@ -681,10 +681,15 @@ public class FlutterView extends SurfaceView } } + // Called by native to update the semantics/accessibility tree. private void updateSemantics(ByteBuffer buffer, String[] strings) { - if (mAccessibilityNodeProvider != null) { - buffer.order(ByteOrder.LITTLE_ENDIAN); - mAccessibilityNodeProvider.updateSemantics(buffer, strings); + try { + if (mAccessibilityNodeProvider != null) { + buffer.order(ByteOrder.LITTLE_ENDIAN); + mAccessibilityNodeProvider.updateSemantics(buffer, strings); + } + } catch (Exception ex) { + Log.e(TAG, "Uncaught exception while updating semantics", ex); } }