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
38e535e5
Commit
38e535e5
authored
13 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Change a parameter type to make a call clearer
Change-Id: I2918d0a8b00da743689b919f80128bbf36973f24
parent
5bc2b612
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/LatinIME.java
+5
-6
5 additions, 6 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
with
5 additions
and
6 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
5
−
6
View file @
38e535e5
...
@@ -981,7 +981,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
...
@@ -981,7 +981,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// When in fullscreen mode, show completions generated by the application
// When in fullscreen mode, show completions generated by the application
final
SuggestedWords
words
=
builder
.
build
();
final
SuggestedWords
words
=
builder
.
build
();
setSuggestions
(
words
);
setSuggestions
(
words
);
setAutoCorrectionIndicator
(
words
);
setAutoCorrectionIndicator
(
Utils
.
willAutoCorrect
(
words
)
)
;
// TODO: is this the right thing to do? What should we auto-correct to in
// TODO: is this the right thing to do? What should we auto-correct to in
// this case? This says to keep whatever the user typed.
// this case? This says to keep whatever the user typed.
mWordComposer
.
setAutoCorrection
(
mWordComposer
.
getTypedWord
());
mWordComposer
.
setAutoCorrection
(
mWordComposer
.
getTypedWord
());
...
@@ -1715,7 +1715,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
...
@@ -1715,7 +1715,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public
void
clearSuggestions
()
{
public
void
clearSuggestions
()
{
setSuggestions
(
SuggestedWords
.
EMPTY
);
setSuggestions
(
SuggestedWords
.
EMPTY
);
setAutoCorrectionIndicator
(
SuggestedWords
.
EMPTY
);
setAutoCorrectionIndicator
(
Utils
.
willAutoCorrect
(
SuggestedWords
.
EMPTY
)
)
;
}
}
public
void
setSuggestions
(
final
SuggestedWords
words
)
{
public
void
setSuggestions
(
final
SuggestedWords
words
)
{
...
@@ -1726,13 +1726,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
...
@@ -1726,13 +1726,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
}
}
}
private
void
setAutoCorrectionIndicator
(
final
SuggestedWords
words
)
{
private
void
setAutoCorrectionIndicator
(
final
boolean
newAutoCorrectionIndicator
)
{
// Put a blue underline to a word in TextView which will be auto-corrected.
// Put a blue underline to a word in TextView which will be auto-corrected.
final
InputConnection
ic
=
getCurrentInputConnection
();
final
InputConnection
ic
=
getCurrentInputConnection
();
if
(
ic
!=
null
)
{
if
(
ic
!=
null
)
{
final
boolean
oldAutoCorrectionIndicator
=
final
boolean
oldAutoCorrectionIndicator
=
mComposingStateManager
.
isAutoCorrectionIndicatorOn
();
mComposingStateManager
.
isAutoCorrectionIndicatorOn
();
final
boolean
newAutoCorrectionIndicator
=
Utils
.
willAutoCorrect
(
words
);
if
(
oldAutoCorrectionIndicator
!=
newAutoCorrectionIndicator
)
{
if
(
oldAutoCorrectionIndicator
!=
newAutoCorrectionIndicator
)
{
mComposingStateManager
.
setAutoCorrectionIndicatorOn
(
newAutoCorrectionIndicator
);
mComposingStateManager
.
setAutoCorrectionIndicatorOn
(
newAutoCorrectionIndicator
);
if
(
DEBUG
)
{
if
(
DEBUG
)
{
...
@@ -1853,7 +1852,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
...
@@ -1853,7 +1852,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
}
mWordComposer
.
setAutoCorrection
(
autoCorrection
);
mWordComposer
.
setAutoCorrection
(
autoCorrection
);
setSuggestions
(
suggestedWords
);
setSuggestions
(
suggestedWords
);
setAutoCorrectionIndicator
(
suggestedWords
);
setAutoCorrectionIndicator
(
Utils
.
willAutoCorrect
(
suggestedWords
)
)
;
setSuggestionStripShown
(
isSuggestionsStripVisible
());
setSuggestionStripShown
(
isSuggestionsStripVisible
());
}
}
...
@@ -2027,7 +2026,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
...
@@ -2027,7 +2026,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public
void
setPunctuationSuggestions
()
{
public
void
setPunctuationSuggestions
()
{
setSuggestions
(
mSettingsValues
.
mSuggestPuncList
);
setSuggestions
(
mSettingsValues
.
mSuggestPuncList
);
setAutoCorrectionIndicator
(
mSettingsValues
.
mSuggestPuncList
);
setAutoCorrectionIndicator
(
Utils
.
willAutoCorrect
(
mSettingsValues
.
mSuggestPuncList
)
)
;
setSuggestionStripShown
(
isSuggestionsStripVisible
());
setSuggestionStripShown
(
isSuggestionsStripVisible
());
}
}
...
...
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