Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
74224f2c
Commit
74224f2c
authored
11 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
[QRP2] Small refactor
Bug: 13170509 Change-Id: Ib9f10b8a137fc773ab0e5dc903e577038e29a9e2
parent
ef3a4564
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/Suggest.java
+4
-3
4 additions, 3 deletions
java/src/com/android/inputmethod/latin/Suggest.java
with
4 additions
and
3 deletions
java/src/com/android/inputmethod/latin/Suggest.java
+
4
−
3
View file @
74224f2c
...
...
@@ -147,6 +147,8 @@ public final class Suggest {
}
}
final
boolean
isPrediction
=
!
wordComposer
.
isComposingWord
();
// We allow auto-correction if we have a whitelisted word, or if the word is not a valid
// word of more than 1 char, except if the first suggestion is the same as the typed string
// because in this case if it's strong enough to auto-correct that will mistakenly designate
...
...
@@ -165,7 +167,7 @@ public final class Suggest {
// same time, it feels wrong that the SuggestedWord object includes information about
// the current settings. It may also be useful to know, when the setting is off, whether
// the word *would* have been auto-corrected.
if
(!
isCorrectionEnabled
||
!
allowsToBeAutoCorrected
||
!
wordComposer
.
isComposingWord
()
if
(!
isCorrectionEnabled
||
!
allowsToBeAutoCorrected
||
isPrediction
||
suggestionsSet
.
isEmpty
()
||
wordComposer
.
hasDigits
()
||
wordComposer
.
isMostlyCaps
()
||
wordComposer
.
isResumed
()
||
!
mDictionaryFacilitator
.
hasMainDictionary
()
...
...
@@ -227,8 +229,7 @@ public final class Suggest {
// rename the attribute or change the value.
!
allowsToBeAutoCorrected
/* typedWordValid */
,
hasAutoCorrection
,
/* willAutoCorrect */
false
/* isObsoleteSuggestions */
,
!
wordComposer
.
isComposingWord
()
/* isPrediction */
,
sequenceNumber
));
false
/* isObsoleteSuggestions */
,
isPrediction
,
sequenceNumber
));
}
// Retrieves suggestions for the batch input
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment