Fix insert mode crash when text has UpdateLayout span

Previously, when text has UpdateLayout span and OffsetMapping(typically used by insert mode) the DynamicLayout reflow the wrong range when the span is updated. As a result, DynamicLayout will enter an inconsistent state where getLineStart/End() will return the wrong result. This CL fixed the issue by applying the reflow correctly.

Bug: 355137282
Test: DynamicLayoutOffsetMappingTest
Flag: com.android.text.flags.insert_mode_crash_update_layout_span
Change-Id: I5bd3980ff3adf22f1ff843941e303f540dac730d
3 files changed