From 419636091236b7e5f4818c99aef55043b25eef82 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 17 Dec 2013 18:08:48 +0900 Subject: [PATCH] Run GC when needed, instead of too late. Bug: 12164855 Change-Id: Ie4d8be9f2652b01470bcc06911e2191e09fb3149 --- .../android/inputmethod/latin/makedict/Ver4DictEncoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java index 8eaee4d9f..d34aa171e 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java @@ -91,9 +91,9 @@ public class Ver4DictEncoder implements DictEncoder { for (final WeightedString word1 : word0.mBigrams) { binaryDict.addBigramWords(word0.mWord, word1.mWord, word1.mFrequency, 0 /* timestamp */); - } - if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) { - binaryDict.flushWithGC(); + if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) { + binaryDict.flushWithGC(); + } } } binaryDict.flushWithGC();