From 060917ed9abff0e777e6b99e43cc4b826d1ac0c8 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 17 Sep 2013 19:05:30 +0900 Subject: [PATCH] [AC9] Resize an array It's not easy for native code to only output the first result, so let's supply enough room for it to output all. Bug: 9059617 Change-Id: Ie93b7e54284c8c5d01fdc15846cf52d3442287b6 --- java/src/com/android/inputmethod/latin/BinaryDictionary.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index 709b0a16e..b49cd80ab 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -54,7 +54,7 @@ public final class BinaryDictionary extends Dictionary { private final int[] mSpaceIndices = new int[MAX_RESULTS]; private final int[] mOutputScores = new int[MAX_RESULTS]; private final int[] mOutputTypes = new int[MAX_RESULTS]; - private final int[] mOutputAutoCommitFirstWordConfidence = new int[1]; // Only one result + private final int[] mOutputAutoCommitFirstWordConfidence = new int[MAX_RESULTS]; private final NativeSuggestOptions mNativeSuggestOptions = new NativeSuggestOptions();