Fix DynamicLayout block index calculation after edit
DynamicLayout made wrong adjustments to the block indices set to be redrawn. Every indice after the first change was being added the diff count in the blocks. However this meant when there are 2 deletes and an index as 1, it would become -1 (wrong array index). The change should be applied to indices outside of [firstBlock, lastBlock]. Test: Added android.text.DynamicLayoutTest#testReflow_afterSpannableEdit Test: bit FrameworksCoreTests:android.text.DynamicLayoutTest Test: bit FrameworksCoreTests:android.text.DynamicLayoutBlocksTest Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest Bug: 67405337 Change-Id: Ie5e5658ffca4293f32f7b574d22d307e9e8d52dc
Loading
Please register or sign in to comment