2013-08-12 03:44:04 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2013-08-15 10:11:09 +00:00
|
|
|
#define LOG_TAG "LatinIME: jni: BinaryDictDecoder"
|
2013-08-12 03:44:04 +00:00
|
|
|
|
2013-08-15 10:11:09 +00:00
|
|
|
#include "com_android_inputmethod_latin_makedict_BinaryDictDecoder.h"
|
2013-08-12 03:44:04 +00:00
|
|
|
|
|
|
|
#include "defines.h"
|
|
|
|
#include "jni.h"
|
|
|
|
#include "jni_common.h"
|
|
|
|
|
|
|
|
namespace latinime {
|
2013-08-15 10:11:09 +00:00
|
|
|
static int latinime_BinaryDictDecoder_doNothing(JNIEnv *env, jclass clazz) {
|
2013-08-12 03:44:04 +00:00
|
|
|
// This is a phony method for test - it does nothing. It just returns some value
|
|
|
|
// unlikely to be in memory by chance for testing purposes.
|
|
|
|
// TODO: remove this method.
|
|
|
|
return 2097;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const JNINativeMethod sMethods[] = {
|
|
|
|
{
|
|
|
|
// TODO: remove this entry when we have one useful method in here
|
|
|
|
const_cast<char *>("doNothing"),
|
|
|
|
const_cast<char *>("()I"),
|
2013-08-15 10:11:09 +00:00
|
|
|
reinterpret_cast<void *>(latinime_BinaryDictDecoder_doNothing)
|
2013-08-12 03:44:04 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2013-08-15 10:11:09 +00:00
|
|
|
int register_BinaryDictDecoder(JNIEnv *env) {
|
2013-08-12 03:44:04 +00:00
|
|
|
const char *const kClassPathName =
|
2013-08-15 10:11:09 +00:00
|
|
|
"com/android/inputmethod/latin/makedict/BinaryDictDecoder";
|
2013-08-12 03:44:04 +00:00
|
|
|
return registerNativeMethods(env, kClassPathName, sMethods, NELEMS(sMethods));
|
|
|
|
}
|
|
|
|
} // namespace latinime
|