aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/CandidateView.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-08-31 20:49:45 +0900
committerJean Chalard <jchalard@google.com>2011-09-01 12:59:17 +0900
commit358e1327d8d1c392ab711778d8e616400360e313 (patch)
treecce94d6bb3f8288a94109671f66b0e80ea0391d8 /java/src/com/android/inputmethod/latin/CandidateView.java
parentb2f93c53dba125327844b97b8c180d1425b754d6 (diff)
downloadlatinime-358e1327d8d1c392ab711778d8e616400360e313.tar.gz
latinime-358e1327d8d1c392ab711778d8e616400360e313.tar.xz
latinime-358e1327d8d1c392ab711778d8e616400360e313.zip
Fix a bug where autotext would occasionally not work
Autotext correction would check whether the first suggestion so far was the same as what Autotext would return, and if it was indeed the same, would not send its result as autocorrect. However, the first suggestion is not guaranteed to have a high enough score to trigger autocorrection, and there would be cases where a word in autotext would not get autocorrected because the word came out of bigram suggestions. These occurrences would be extremely rare, as they would require concomitant insert between autotext for one char and bigram suggestion. It is, in fact, probably limited to the capitalization of "I". This did not happen in gingerbread because gingerbread would not register 1-letter words as valid bigrams. This fix works by just always sending the result of autotext regardless of whether it is already the first suggestion or not. This is okay because duplicates are removed afterwards anyway - and this processing is absolutely necessary because the autotext'd word may actually be somewhere else in the suggestion, so it made really no sense checking for only the first one. Please note that there is also a race condition that can result in "i" not being converted to "I": at the moment, Latin IME relies on having the suggestions evaluated at the time autocorrection is performed, but when typing very, very fast, those messages may have been canceled. This is not limited to the autocorrection of "i", but affects all autocorrections. It requires a nearly inhumane typing speed to trigger, but hitting "i" and space in turn as fast as one can it's possible to reproduce occasionally. Bug: 5135113 Change-Id: I530ea6212487300001a2c0fc5b25a5c7716bdf63
Diffstat (limited to 'java/src/com/android/inputmethod/latin/CandidateView.java')
0 files changed, 0 insertions, 0 deletions