Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(jni): minor adjust to the headers
split the common definitions to the jni-common.h
- Loading branch information
1 parent
405d779
commit 7d3e450
Showing
5 changed files
with
23 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef TRIME_JNI_COMMON_H | ||
#define TRIME_JNI_COMMON_H | ||
|
||
#include "jni-utils.h" | ||
|
||
static GlobalRefSingleton *GlobalRef; | ||
|
||
#define TAG "rime.jni" | ||
#ifdef ANDROID | ||
#include <android/log.h> | ||
#define ALOGE(fmt, ...) __android_log_print(ANDROID_LOG_ERROR, TAG, fmt, ##__VA_ARGS__) | ||
#define ALOGI(fmt, ...) __android_log_print(ANDROID_LOG_INFO, TAG, fmt, ##__VA_ARGS__) | ||
#endif | ||
|
||
#define BUFSIZE 256 | ||
|
||
#endif //TRIME_JNI_COMMON_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
#ifndef RIME_JNI_H_ | ||
#define RIME_JNI_H_ | ||
|
||
#include "jni-utils.h" | ||
#include <jni.h> | ||
#include <rime_api.h> | ||
#include <rime_levers_api.h> | ||
|
||
static GlobalRefSingleton *GlobalRef; | ||
|
||
#define TAG "Rime-JNI" | ||
#ifdef ANDROID | ||
#include <android/log.h> | ||
#define ALOGE(fmt, ...) __android_log_print(ANDROID_LOG_ERROR, TAG, fmt, ##__VA_ARGS__) | ||
#define ALOGI(fmt, ...) __android_log_print(ANDROID_LOG_INFO, TAG, fmt, ##__VA_ARGS__) | ||
#else | ||
#define ALOGE printf | ||
#define ALOGI printf | ||
#endif | ||
|
||
#define BUFSIZE 256 | ||
jobject rimeSchemaListToJObject(JNIEnv *env, RimeSchemaList* list); | ||
|
||
#endif // RIME_JNI_H_ |