Skip to content
Commit 7e821f05 authored by Qi Wang's avatar Qi Wang
Browse files

Fix the SuggestionSpan overwrite logic.

Previously, the SpellChecker use the start and end positions as the key
to maintain the SuggestionSpan cache.

However, the actual start/end position of the SuggestionSpan may changes
when the text is changed. Hence we may not be able to find the
corresponding SuggestonSpan for a new suggestion with the changed
start/end positions.

In this fix, we deprecated the cache and use Spanned#getSpans to find
overlapped spans instead.

Change-Id: I1e732f335ad745d85a7620e3ced6858551f18232

Fix: 182982338

Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I327e5163499cfc978ff8480664a7e728b6ea7249
parent 346aaf46
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