Spans should be preserved in TextInfo whenever possible
This is a follow up CL for Ib58ece68dee4c6187d469049fca8c3. Now SpellCheckerService is expected to store span information in TextInfo whenever possible so that spell checker service can use it later. BUG: 15869548 Change-Id: I481a2efe359de6162ebe095f60506aba3db3d762
This commit is contained in:
@@ -383,8 +383,9 @@ public abstract class SpellCheckerService extends Service {
|
||||
while (wordStart <= end && wordEnd != BreakIterator.DONE
|
||||
&& wordStart != BreakIterator.DONE) {
|
||||
if (wordEnd >= start && wordEnd > wordStart) {
|
||||
final String query = originalText.subSequence(wordStart, wordEnd).toString();
|
||||
final TextInfo ti = new TextInfo(query, cookie, query.hashCode());
|
||||
final CharSequence query = originalText.subSequence(wordStart, wordEnd);
|
||||
final TextInfo ti = new TextInfo(query, 0, query.length(), cookie,
|
||||
query.hashCode());
|
||||
wordItems.add(new SentenceWordItem(ti, wordStart, wordEnd));
|
||||
if (DBG) {
|
||||
Log.d(TAG, "Adapter: word (" + (wordItems.size() - 1) + ") " + query);
|
||||
|
||||
Reference in New Issue
Block a user