Skip to content
Commit 50b585e2 authored by Siyamed Sinir's avatar Siyamed Sinir
Browse files

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
parent 866a3836
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment