am 2a32771a: am 24871f63: Merge "Fix Text appears on top of existing text when composing in gmail." into klp-dev

* commit '2a32771ace5250ec919a08da688e2d6c91e5c132':
  Fix Text appears on top of existing text when composing in gmail.
This commit is contained in:
Raph Levien
2013-10-04 15:10:13 -07:00
committed by Android Git Automerger

View File

@@ -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) {