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
b5ac8ef5
Commit
b5ac8ef5
authored
12 years ago
by
Kurt Partridge
Browse files
Options
Downloads
Patches
Plain Diff
Consolidate SuggestedWords.getWordInfo and .getInfo
Change-Id: I959cf049f550b7be3ec002281ca7457e566b0214
parent
34b88560
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/latin/SuggestedWords.java
+1
-5
1 addition, 5 deletions
java/src/com/android/inputmethod/latin/SuggestedWords.java
java/src/com/android/inputmethod/research/JsonUtils.java
+1
-1
1 addition, 1 deletion
java/src/com/android/inputmethod/research/JsonUtils.java
with
2 additions
and
6 deletions
java/src/com/android/inputmethod/latin/SuggestedWords.java
+
1
−
5
View file @
b5ac8ef5
...
...
@@ -65,10 +65,6 @@ public final class SuggestedWords {
return
mSuggestedWordInfoList
.
get
(
pos
).
mWord
;
}
public
SuggestedWordInfo
getWordInfo
(
int
pos
)
{
return
mSuggestedWordInfoList
.
get
(
pos
);
}
public
SuggestedWordInfo
getInfo
(
int
pos
)
{
return
mSuggestedWordInfoList
.
get
(
pos
);
}
...
...
@@ -113,7 +109,7 @@ public final class SuggestedWords {
alreadySeen
.
add
(
typedWord
.
toString
());
final
int
previousSize
=
previousSuggestions
.
size
();
for
(
int
pos
=
1
;
pos
<
previousSize
;
pos
++)
{
final
SuggestedWordInfo
prevWordInfo
=
previousSuggestions
.
get
Word
Info
(
pos
);
final
SuggestedWordInfo
prevWordInfo
=
previousSuggestions
.
getInfo
(
pos
);
final
String
prevWord
=
prevWordInfo
.
mWord
;
// Filter out duplicate suggestion.
if
(!
alreadySeen
.
contains
(
prevWord
))
{
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/research/JsonUtils.java
+
1
−
1
View file @
b5ac8ef5
...
...
@@ -98,7 +98,7 @@ import java.util.Map;
jsonWriter
.
beginArray
();
final
int
size
=
words
.
size
();
for
(
int
j
=
0
;
j
<
size
;
j
++)
{
final
SuggestedWordInfo
wordInfo
=
words
.
get
Word
Info
(
j
);
final
SuggestedWordInfo
wordInfo
=
words
.
getInfo
(
j
);
jsonWriter
.
value
(
wordInfo
.
toString
());
}
jsonWriter
.
endArray
();
...
...
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