Home | History | Annotate | Download | only in jni
      1 /*
      2  * Copyright (C) 2013 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #define LOG_TAG "LatinIME: jni: Ver3DictDecoder"
     18 
     19 #include "com_android_inputmethod_latin_makedict_Ver3DictDecoder.h"
     20 
     21 #include "defines.h"
     22 #include "jni.h"
     23 #include "jni_common.h"
     24 
     25 namespace latinime {
     26 static int latinime_Ver3DictDecoder_doNothing(JNIEnv *env, jclass clazz) {
     27     // This is a phony method for test - it does nothing. It just returns some value
     28     // unlikely to be in memory by chance for testing purposes.
     29     // TODO: remove this method.
     30     return 2097;
     31 }
     32 
     33 static const JNINativeMethod sMethods[] = {
     34     {
     35         // TODO: remove this entry when we have one useful method in here
     36         const_cast<char *>("doNothing"),
     37         const_cast<char *>("()I"),
     38         reinterpret_cast<void *>(latinime_Ver3DictDecoder_doNothing)
     39     },
     40 };
     41 
     42 int register_Ver3DictDecoder(JNIEnv *env) {
     43     const char *const kClassPathName =
     44             "com/android/inputmethod/latin/makedict/Ver3DictDecoder";
     45     return registerNativeMethods(env, kClassPathName, sMethods, NELEMS(sMethods));
     46 }
     47 } // namespace latinime
     48