Catch exceptions during invocations of updateSemantics from native code (flutter/engine#3813)

This commit is contained in:
Jason Simmons
2017-06-22 11:19:32 -07:00
committed by GitHub
parent 27b214136e
commit 529ee0bb76

View File

@@ -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);
}
}