Makefile and source code structure update for LatinIME AOSP build
Change-Id: Ia2ab54651ef96521fce01fe4755147909b818803
diff --git a/native/jni/src/dictionary.cpp b/native/jni/src/dictionary.cpp
index 10ea9fe..60f3c94 100644
--- a/native/jni/src/dictionary.cpp
+++ b/native/jni/src/dictionary.cpp
@@ -22,6 +22,7 @@
#include "binary_format.h"
#include "defines.h"
#include "dictionary.h"
+#include "incremental_decoder_interface.h"
namespace latinime {
@@ -43,7 +44,8 @@
mUnigramDictionary = new UnigramDictionary(mDict + headerSize, typedLetterMultiplier,
fullWordMultiplier, maxWordLength, maxWords, options);
mBigramDictionary = new BigramDictionary(mDict + headerSize, maxWordLength);
- mGestureDecoder = new GestureDecoder(maxWordLength, maxWords);
+ mGestureDecoder = IncrementalDecoderInterface::getGestureDecoderInstance(maxWordLength,
+ maxWords);
mGestureDecoder->setDict(mUnigramDictionary, mBigramDictionary,
mDict + headerSize /* dict root */, 0 /* root pos */);
}
@@ -51,6 +53,7 @@
Dictionary::~Dictionary() {
delete mUnigramDictionary;
delete mBigramDictionary;
+ delete mGestureDecoder;
}
int Dictionary::getFrequency(const int32_t *word, int length) const {