From 20a8a4a3d9844dc2437fd1ca6325559bb2c3a644 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 15 Jan 2014 18:39:36 +0900 Subject: [PATCH] Fix native method signature Change-Id: Ia2d566f162f746c6b2b2b874f7278d86abd9e839 --- .../android/inputmethod/latin/utils/LanguageModelParam.java | 4 +++- native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java b/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java index 3a5af4b05..a1d641508 100644 --- a/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java +++ b/java/src/com/android/inputmethod/latin/utils/LanguageModelParam.java @@ -25,7 +25,9 @@ import com.android.inputmethod.latin.settings.SpacingAndPunctuations; import java.util.ArrayList; import java.util.Locale; -public class LanguageModelParam { +// Note: this class is used as a parameter type of a native method. You should be careful when you +// rename this class or field name. See BinaryDictionary#addMultipleDictionaryEntriesNative(). +public final class LanguageModelParam { private static final String TAG = LanguageModelParam.class.getSimpleName(); private static final boolean DEBUG = false; private static final boolean DEBUG_TOKEN = false; diff --git a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp index 716bda5a7..26570f4d8 100644 --- a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp +++ b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp @@ -541,7 +541,7 @@ static const JNINativeMethod sMethods[] = { { const_cast("addMultipleDictionaryEntriesNative"), const_cast( - "(J[Lcom/android/inputmethod/latin/BinaryDictionary$LanguageModelParam;I)I"), + "(J[Lcom/android/inputmethod/latin/utils/LanguageModelParam;I)I"), reinterpret_cast(latinime_BinaryDictionary_addMultipleDictionaryEntries) }, {