From 926ef06a1ef8a0f8e01baa26c23172b93012d2b1 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 10 Aug 2012 13:14:45 +0900 Subject: Pass the type from native code all the way to Java. Bug: 6906525 Change-Id: I057390d47a223450e22d8338509e22c28fc0d5f6 --- java/src/com/android/inputmethod/latin/BinaryDictionary.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'java/src') diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index 6ac6e83a3..b6329187d 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -143,9 +143,10 @@ public class BinaryDictionary extends Dictionary { ++len; } if (len > 0) { + final int score = SuggestedWordInfo.KIND_WHITELIST == mOutputTypes[j] + ? SuggestedWordInfo.MAX_SCORE : mOutputScores[j]; suggestions.add(new SuggestedWordInfo( - new String(mOutputChars, start, len), - mOutputScores[j], SuggestedWordInfo.KIND_CORRECTION, mDictType)); + new String(mOutputChars, start, len), score, mOutputTypes[j], mDictType)); } } return suggestions; -- cgit v1.2.3-83-g751a