am f85ec408: am f6c22008: Workaround to stop init dict traverse session
* commit 'f85ec4082f60d4b7a06d907505938d91b3dfcee5': Workaround to stop init dict traverse sessionmain
commit
0914ba8a53
|
@ -23,8 +23,8 @@ public class DicTraverseSession {
|
||||||
JniUtils.loadNativeLibrary();
|
JniUtils.loadNativeLibrary();
|
||||||
}
|
}
|
||||||
private native long setDicTraverseSessionNative(String locale);
|
private native long setDicTraverseSessionNative(String locale);
|
||||||
private native void initDicTraverseSessionNative(long nativeDicTraverseSession,
|
//private native void initDicTraverseSessionNative(long nativeDicTraverseSession,
|
||||||
long dictionary, int[] previousWord, int previwousWordLength);
|
//long dictionary, int[] previousWord, int previousWordLength);
|
||||||
private native void releaseDicTraverseSessionNative(long nativeDicTraverseSession);
|
private native void releaseDicTraverseSessionNative(long nativeDicTraverseSession);
|
||||||
|
|
||||||
private long mNativeDicTraverseSession;
|
private long mNativeDicTraverseSession;
|
||||||
|
@ -43,8 +43,8 @@ public class DicTraverseSession {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initSession(long dictionary, int[] previousWord, int previousWordLength) {
|
public void initSession(long dictionary, int[] previousWord, int previousWordLength) {
|
||||||
initDicTraverseSessionNative(
|
//initDicTraverseSessionNative(
|
||||||
mNativeDicTraverseSession, dictionary, previousWord, previousWordLength);
|
//mNativeDicTraverseSession, dictionary, previousWord, previousWordLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final long createNativeDicTraverseSession(String locale) {
|
private final long createNativeDicTraverseSession(String locale) {
|
||||||
|
|
|
@ -22,11 +22,13 @@
|
||||||
#include "jni_common.h"
|
#include "jni_common.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
class Dictionary;
|
||||||
static jlong latinime_setDicTraverseSession(JNIEnv *env, jobject object, jstring localeJStr) {
|
static jlong latinime_setDicTraverseSession(JNIEnv *env, jobject object, jstring localeJStr) {
|
||||||
void *traverseSession = DicTraverseWrapper::getDicTraverseSession(env, localeJStr);
|
void *traverseSession = DicTraverseWrapper::getDicTraverseSession(env, localeJStr);
|
||||||
return reinterpret_cast<jlong>(traverseSession);
|
return reinterpret_cast<jlong>(traverseSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void latinime_initDicTraverseSession(JNIEnv *env, jobject object, jlong traverseSession,
|
static void latinime_initDicTraverseSession(JNIEnv *env, jobject object, jlong traverseSession,
|
||||||
jlong dictionary, jintArray previousWord, jint previousWordLength) {
|
jlong dictionary, jintArray previousWord, jint previousWordLength) {
|
||||||
void *ts = reinterpret_cast<void*>(traverseSession);
|
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);
|
env->GetIntArrayRegion(previousWord, 0, previousWordLength, prevWord);
|
||||||
DicTraverseWrapper::initDicTraverseSession(ts, dict, prevWord, previousWordLength);
|
DicTraverseWrapper::initDicTraverseSession(ts, dict, prevWord, previousWordLength);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void latinime_DicTraverseSession_release(
|
static void latinime_DicTraverseSession_release(
|
||||||
JNIEnv *env, jobject object, jlong traverseSession) {
|
JNIEnv *env, jobject object, jlong traverseSession) {
|
||||||
|
@ -44,7 +47,7 @@ static void latinime_DicTraverseSession_release(
|
||||||
|
|
||||||
static JNINativeMethod sMethods[] = {
|
static JNINativeMethod sMethods[] = {
|
||||||
{"setDicTraverseSessionNative", "(Ljava/lang/String;)J", (void*)latinime_setDicTraverseSession},
|
{"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}
|
{"releaseDicTraverseSessionNative", "(J)V", (void*)latinime_DicTraverseSession_release}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue