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
0376d9a0
Commit
0376d9a0
authored
11 years ago
by
Jean Chalard
Committed by
Android Git Automerger
11 years ago
Browse files
Options
Downloads
Plain Diff
am
647f629a
: am
a5a2f3e3
: Remove gesture suggestions with an INT_MIN score
* commit '
647f629a
': Remove gesture suggestions with an INT_MIN score
parents
5e5bd3b6
647f629a
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
+12
-0
12 additions, 0 deletions
java/src/com/android/inputmethod/latin/Suggest.java
with
12 additions
and
0 deletions
java/src/com/android/inputmethod/latin/Suggest.java
+
12
−
0
View file @
0376d9a0
...
...
@@ -47,6 +47,9 @@ public final class Suggest {
// TODO: rename this to CORRECTION_ON
public
static
final
int
CORRECTION_FULL
=
1
;
// Close to -2**31
private
static
final
int
SUPPRESS_SUGGEST_THRESHOLD
=
-
2000000000
;
public
interface
SuggestInitializationListener
{
public
void
onUpdateMainDictionaryAvailability
(
boolean
isMainDictionaryAvailable
);
}
...
...
@@ -340,6 +343,15 @@ public final class Suggest {
suggestionsContainer
.
add
(
1
,
rejected
);
}
SuggestedWordInfo
.
removeDups
(
suggestionsContainer
);
// For some reason some suggestions with MIN_VALUE are making their way here.
// TODO: Find a more robust way to detect distractors.
for
(
int
i
=
suggestionsContainer
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
if
(
suggestionsContainer
.
get
(
i
).
mScore
<
SUPPRESS_SUGGEST_THRESHOLD
)
{
suggestionsContainer
.
remove
(
i
);
}
}
// In the batch input mode, the most relevant suggested word should act as a "typed word"
// (typedWordValid=true), not as an "auto correct word" (willAutoCorrect=false).
return
new
SuggestedWords
(
suggestionsContainer
,
...
...
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