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

Commit 691ac050 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android Git Automerger
Browse files

am 45ebb200: Merge "Preserve spans when splitting sentences"

* commit '45ebb200':
  Preserve spans when splitting sentences
parents c2902b8c 45ebb200
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -145,9 +145,8 @@ public class SentenceLevelAdapter {
        int wordEnd = wordIterator.getEndOfWord(originalText, wordStart);
        while (wordStart <= end && wordEnd != -1 && wordStart != -1) {
            if (wordEnd >= start && wordEnd > wordStart) {
                CharSequence subSequence = originalText.subSequence(wordStart, wordEnd).toString();
                final TextInfo ti = TextInfoCompatUtils.newInstance(subSequence, 0,
                        subSequence.length(), cookie, subSequence.hashCode());
                final TextInfo ti = TextInfoCompatUtils.newInstance(originalText, wordStart,
                        wordEnd, cookie, originalText.subSequence(wordStart, wordEnd).hashCode());
                wordItems.add(new SentenceWordItem(ti, wordStart, wordEnd));
            }
            wordStart = wordIterator.getBeginningOfNextWord(originalText, wordEnd);