Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_inputmethods_LatinIME
Commits
5b5ed3d6
Commit
5b5ed3d6
authored
11 years ago
by
Jean Chalard
Committed by
The Android Automerger
11 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix a bug where autocaps would jam auto-commit
Bug: 11311002 Change-Id: I62955e364c9ffc75322cf05fa3ad7985f1d09259
parent
79ccba75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
java/src/com/android/inputmethod/latin/Suggest.java
java/src/com/android/inputmethod/latin/Suggest.java
+1
-1
tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
...rc/com/android/inputmethod/latin/SuggestedWordsTests.java
+8
-2
No files found.
java/src/com/android/inputmethod/latin/Suggest.java
View file @
5b5ed3d6
...
...
@@ -479,7 +479,7 @@ public final class Suggest {
}
return
new
SuggestedWordInfo
(
sb
.
toString
(),
wordInfo
.
mScore
,
wordInfo
.
mKind
,
wordInfo
.
mSourceDict
,
wordInfo
.
mIndexOfTouchPointOfSecondWord
,
SuggestedWordInfo
.
NOT_A_CONFIDENCE
/* a
utoCommitFirstWordConfidence
*/
);
wordInfo
.
mA
utoCommitFirstWordConfidence
);
}
public
void
close
()
{
...
...
This diff is collapsed.
Click to expand it.
tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
View file @
5b5ed3d6
...
...
@@ -25,6 +25,7 @@ import com.android.inputmethod.latin.utils.CollectionUtils;
import
java.util.ArrayList
;
import
java.util.Locale
;
import
java.util.Random
;
@SmallTest
public
class
SuggestedWordsTests
extends
AndroidTestCase
{
...
...
@@ -72,15 +73,20 @@ public class SuggestedWordsTests extends AndroidTestCase {
return
new
SuggestedWordInfo
(
s
,
100
,
SuggestedWordInfo
.
KIND_TYPED
,
null
/* sourceDict */
,
SuggestedWordInfo
.
NOT_AN_INDEX
/* indexOfTouchPointOfSecondWord */
,
SuggestedWordInfo
.
NOT_A_CONFIDENCE
/* autoCommitFirstWordConfidence */
);
new
Random
().
nextInt
(
1000000
)
/* autoCommitFirstWordConfidence */
);
}
// Helper for testGetTransformedWordInfo
private
SuggestedWordInfo
transformWordInfo
(
final
String
info
,
final
int
trailingSingleQuotesCount
)
{
return
Suggest
.
getTransformedSuggestedWordInfo
(
createWordInfo
(
info
),
final
SuggestedWordInfo
suggestedWordInfo
=
createWordInfo
(
info
);
final
SuggestedWordInfo
returnedWordInfo
=
Suggest
.
getTransformedSuggestedWordInfo
(
suggestedWordInfo
,
Locale
.
ENGLISH
,
false
/* isAllUpperCase */
,
false
/* isFirstCharCapitalized */
,
trailingSingleQuotesCount
);
assertEquals
(
suggestedWordInfo
.
mAutoCommitFirstWordConfidence
,
returnedWordInfo
.
mAutoCommitFirstWordConfidence
);
return
returnedWordInfo
;
}
public
void
testGetTransformedSuggestedWordInfo
()
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment