Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24871f63 authored by Raph Levien's avatar Raph Levien Committed by Android (Google) Code Review
Browse files

Merge "Fix Text appears on top of existing text when composing in gmail." into klp-dev

parents fc141ef2 63b3eb65
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -502,17 +502,19 @@ public class DynamicLayout extends Layout
        }

        mNumberOfBlocks = newNumberOfBlocks;
        int newFirstChangedBlock;
        final int deltaLines = newLineCount - (endLine - startLine + 1);
        if (deltaLines != 0) {
            // Display list whose index is >= mIndexFirstChangedBlock is valid
            // but it needs to update its drawing location.
            mIndexFirstChangedBlock = firstBlock + numAddedBlocks;
            for (int i = mIndexFirstChangedBlock; i < mNumberOfBlocks; i++) {
            newFirstChangedBlock = firstBlock + numAddedBlocks;
            for (int i = newFirstChangedBlock; i < mNumberOfBlocks; i++) {
                mBlockEndLines[i] += deltaLines;
            }
        } else {
            mIndexFirstChangedBlock = mNumberOfBlocks;
            newFirstChangedBlock = mNumberOfBlocks;
        }
        mIndexFirstChangedBlock = Math.min(mIndexFirstChangedBlock, newFirstChangedBlock);

        int blockIndex = firstBlock;
        if (createBlockBefore) {