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
eb4f8506
Commit
eb4f8506
authored
10 years ago
by
Xiaojun Bi
Browse files
Options
Downloads
Patches
Plain Diff
Fix a NPE in DistracterFilter.isDistracterToWordsInDictionaries()
Bug: 14904706 Change-Id: I3b52bb01b9c59cbba2eba0bd1d91dffb4419c019
parent
161fa05d
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/utils/DistracterFilter.java
+2
-7
2 additions, 7 deletions
...com/android/inputmethod/latin/utils/DistracterFilter.java
with
2 additions
and
7 deletions
java/src/com/android/inputmethod/latin/utils/DistracterFilter.java
+
2
−
7
View file @
eb4f8506
...
@@ -90,19 +90,14 @@ public class DistracterFilter {
...
@@ -90,19 +90,14 @@ public class DistracterFilter {
*/
*/
public
boolean
isDistracterToWordsInDictionaries
(
final
String
prevWord
,
public
boolean
isDistracterToWordsInDictionaries
(
final
String
prevWord
,
final
String
testedWord
)
{
final
String
testedWord
)
{
if
(
mSuggest
==
null
)
{
if
(
mSuggest
==
null
||
mKeyboard
==
null
)
{
return
false
;
return
false
;
}
}
final
WordComposer
composer
=
new
WordComposer
();
final
WordComposer
composer
=
new
WordComposer
();
final
int
[]
codePoints
=
StringUtils
.
toCodePointArray
(
testedWord
);
final
int
[]
codePoints
=
StringUtils
.
toCodePointArray
(
testedWord
);
final
int
[]
coordinates
;
final
int
[]
coordinates
;
if
(
null
==
mKeyboard
)
{
coordinates
=
mKeyboard
.
getCoordinates
(
codePoints
);
coordinates
=
CoordinateUtils
.
newCoordinateArray
(
codePoints
.
length
,
Constants
.
NOT_A_COORDINATE
,
Constants
.
NOT_A_COORDINATE
);
}
else
{
coordinates
=
mKeyboard
.
getCoordinates
(
codePoints
);
}
composer
.
setComposingWord
(
codePoints
,
coordinates
,
prevWord
);
composer
.
setComposingWord
(
codePoints
,
coordinates
,
prevWord
);
final
int
trailingSingleQuotesCount
=
composer
.
trailingSingleQuotesCount
();
final
int
trailingSingleQuotesCount
=
composer
.
trailingSingleQuotesCount
();
...
...
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