diff options
author | 2014-10-03 11:39:21 +0900 | |
---|---|---|
committer | 2014-10-03 18:16:34 +0900 | |
commit | 4ef27c035892888df82d9c9f32ac12ed48c8308f (patch) | |
tree | b23ae4a98571f267c64783c0d5cefca960238981 /native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp | |
parent | fb051c3957ae17061204b06258aec3b2e0f05034 (diff) | |
download | latinime-4ef27c035892888df82d9c9f32ac12ed48c8308f.tar.gz latinime-4ef27c035892888df82d9c9f32ac12ed48c8308f.tar.xz latinime-4ef27c035892888df82d9c9f32ac12ed48c8308f.zip |
[ML13] Fix the locale passing in ProximityInfo
The locale is used to determine additional proximity characters. This
is dependent on the dictionary language, but was passed as a function
of the layout, which is wrong and would have given bad suggestions in
multi-lingual mode.
Ideally, additional proximity characters should be inserted in the
dictionary header, but for now it's a rather simple change to get
it from the dictionary's locale instead of the proximity info locale.
Also, that allows us to remove completely the locale parameter from
proximity info, which is a much needed change.
This change has zero effect on unit tests and on regression tests.
Bug: 11230254
Change-Id: If95157155db7dccd1f00b8ba55ccb3600283f9e4
Diffstat (limited to '')
-rw-r--r-- | native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp b/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp index f88d37ec9..80419b335 100644 --- a/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp +++ b/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp @@ -25,13 +25,13 @@ namespace latinime { -static jlong latinime_Keyboard_setProximityInfo(JNIEnv *env, jclass clazz, jstring localeJStr, +static jlong latinime_Keyboard_setProximityInfo(JNIEnv *env, jclass clazz, jint displayWidth, jint displayHeight, jint gridWidth, jint gridHeight, jint mostCommonkeyWidth, jint mostCommonkeyHeight, jintArray proximityChars, jint keyCount, jintArray keyXCoordinates, jintArray keyYCoordinates, jintArray keyWidths, jintArray keyHeights, jintArray keyCharCodes, jfloatArray sweetSpotCenterXs, jfloatArray sweetSpotCenterYs, jfloatArray sweetSpotRadii) { - ProximityInfo *proximityInfo = new ProximityInfo(env, localeJStr, displayWidth, displayHeight, + ProximityInfo *proximityInfo = new ProximityInfo(env, displayWidth, displayHeight, gridWidth, gridHeight, mostCommonkeyWidth, mostCommonkeyHeight, proximityChars, keyCount, keyXCoordinates, keyYCoordinates, keyWidths, keyHeights, keyCharCodes, sweetSpotCenterXs, sweetSpotCenterYs, sweetSpotRadii); @@ -46,7 +46,7 @@ static void latinime_Keyboard_release(JNIEnv *env, jclass clazz, jlong proximity static const JNINativeMethod sMethods[] = { { const_cast<char *>("setProximityInfoNative"), - const_cast<char *>("(Ljava/lang/String;IIIIII[II[I[I[I[I[I[F[F[F)J"), + const_cast<char *>("(IIIIII[II[I[I[I[I[I[F[F[F)J"), reinterpret_cast<void *>(latinime_Keyboard_setProximityInfo) }, { |