From ea727b6b71398c9f78fbc7b79d3f0c73d301b938 Mon Sep 17 00:00:00 2001 From: Mohammadinamul Sheik Date: Tue, 17 Mar 2015 12:31:18 -0700 Subject: [PATCH] Carry over the mMaxPreWordCount when creating the new NgramContext Change-Id: Iaba2e4b356486b60d550f10121695ef46e5e75da --- java/src/com/android/inputmethod/latin/NgramContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/NgramContext.java b/java/src/com/android/inputmethod/latin/NgramContext.java index f8fba6256..9682fb8a4 100644 --- a/java/src/com/android/inputmethod/latin/NgramContext.java +++ b/java/src/com/android/inputmethod/latin/NgramContext.java @@ -128,7 +128,7 @@ public class NgramContext { final WordInfo[] prevWordsInfo = new WordInfo[nextPrevWordCount]; prevWordsInfo[0] = wordInfo; System.arraycopy(mPrevWordsInfo, 0, prevWordsInfo, 1, nextPrevWordCount - 1); - return new NgramContext(prevWordsInfo); + return new NgramContext(mMaxPrevWordCount, prevWordsInfo); }