mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Workaround to stop init dict traverse session
Change-Id: I3d46c54a96a9fc0359ef75b9d2f8590b44164a8b
This commit is contained in:
parent
0f4de30e58
commit
f6c2200890
@ -23,8 +23,8 @@ public class DicTraverseSession {
|
||||
JniUtils.loadNativeLibrary();
|
||||
}
|
||||
private native long setDicTraverseSessionNative(String locale);
|
||||
private native void initDicTraverseSessionNative(long nativeDicTraverseSession,
|
||||
long dictionary, int[] previousWord, int previwousWordLength);
|
||||
//private native void initDicTraverseSessionNative(long nativeDicTraverseSession,
|
||||
//long dictionary, int[] previousWord, int previousWordLength);
|
||||
private native void releaseDicTraverseSessionNative(long nativeDicTraverseSession);
|
||||
|
||||
private long mNativeDicTraverseSession;
|
||||
@ -43,8 +43,8 @@ public class DicTraverseSession {
|
||||
}
|
||||
|
||||
public void initSession(long dictionary, int[] previousWord, int previousWordLength) {
|
||||
initDicTraverseSessionNative(
|
||||
mNativeDicTraverseSession, dictionary, previousWord, previousWordLength);
|
||||
//initDicTraverseSessionNative(
|
||||
//mNativeDicTraverseSession, dictionary, previousWord, previousWordLength);
|
||||
}
|
||||
|
||||
private final long createNativeDicTraverseSession(String locale) {
|
||||
|
@ -22,11 +22,13 @@
|
||||
#include "jni_common.h"
|
||||
|
||||
namespace latinime {
|
||||
class Dictionary;
|
||||
static jlong latinime_setDicTraverseSession(JNIEnv *env, jobject object, jstring localeJStr) {
|
||||
void *traverseSession = DicTraverseWrapper::getDicTraverseSession(env, localeJStr);
|
||||
return reinterpret_cast<jlong>(traverseSession);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void latinime_initDicTraverseSession(JNIEnv *env, jobject object, jlong traverseSession,
|
||||
jlong dictionary, jintArray previousWord, jint previousWordLength) {
|
||||
void *ts = reinterpret_cast<void*>(traverseSession);
|
||||
@ -35,6 +37,7 @@ static void latinime_initDicTraverseSession(JNIEnv *env, jobject object, jlong t
|
||||
env->GetIntArrayRegion(previousWord, 0, previousWordLength, prevWord);
|
||||
DicTraverseWrapper::initDicTraverseSession(ts, dict, prevWord, previousWordLength);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void latinime_DicTraverseSession_release(
|
||||
JNIEnv *env, jobject object, jlong traverseSession) {
|
||||
@ -44,7 +47,7 @@ static void latinime_DicTraverseSession_release(
|
||||
|
||||
static JNINativeMethod sMethods[] = {
|
||||
{"setDicTraverseSessionNative", "(Ljava/lang/String;)J", (void*)latinime_setDicTraverseSession},
|
||||
{"initDicTraverseSessionNative", "(JJ[II)V", (void*)latinime_initDicTraverseSession},
|
||||
//{"initDicTraverseSessionNative", "(JJ[II)V", (void*)latinime_initDicTraverseSession},
|
||||
{"releaseDicTraverseSessionNative", "(J)V", (void*)latinime_DicTraverseSession_release}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user