am 68b4f2ad: Merge "Add jni interface to use on memory dictionary."
* commit '68b4f2ada9f0208084dca130b59f0a9f2a37ecf6': Add jni interface to use on memory dictionary.main
commit
6d2fb203a8
|
@ -151,6 +151,8 @@ public final class BinaryDictionary extends Dictionary {
|
|||
|
||||
private static native long openNative(String sourceDir, long dictOffset, long dictSize,
|
||||
boolean isUpdatable);
|
||||
private static native long createOnMemoryNative(long formatVersion,
|
||||
String locale, String[] attributeKeyStringArray, String[] attributeValueStringArray);
|
||||
private static native void getHeaderInfoNative(long dict, int[] outHeaderSize,
|
||||
int[] outFormatVersion, ArrayList<int[]> outAttributeKeys,
|
||||
ArrayList<int[]> outAttributeValues);
|
||||
|
|
|
@ -65,6 +65,13 @@ static jlong latinime_BinaryDictionary_open(JNIEnv *env, jclass clazz, jstring s
|
|||
return reinterpret_cast<jlong>(dictionary);
|
||||
}
|
||||
|
||||
static jlong latinime_BinaryDictionary_createOnMemory(JNIEnv *env, jclass clazz,
|
||||
jlong formatVersion, jstring locale, jobjectArray attributeKeyStringArray,
|
||||
jobjectArray attributeValueStringArray) {
|
||||
// TODO: Implement.
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void latinime_BinaryDictionary_flush(JNIEnv *env, jclass clazz, jlong dict,
|
||||
jstring filePath) {
|
||||
Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict);
|
||||
|
@ -467,6 +474,11 @@ static const JNINativeMethod sMethods[] = {
|
|||
const_cast<char *>("(Ljava/lang/String;JJZ)J"),
|
||||
reinterpret_cast<void *>(latinime_BinaryDictionary_open)
|
||||
},
|
||||
{
|
||||
const_cast<char *>("createOnMemoryNative"),
|
||||
const_cast<char *>("(JLjava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)J"),
|
||||
reinterpret_cast<void *>(latinime_BinaryDictionary_createOnMemory)
|
||||
},
|
||||
{
|
||||
const_cast<char *>("closeNative"),
|
||||
const_cast<char *>("(J)V"),
|
||||
|
|
Loading…
Reference in New Issue