parent
77e8e81ad9
commit
1d8a246e39
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: jni: ProximityInfo"
|
#define LOG_TAG "LatinIME: jni: ProximityInfo"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "com_android_inputmethod_keyboard_ProximityInfo.h"
|
#include "com_android_inputmethod_keyboard_ProximityInfo.h"
|
||||||
#include "jni.h"
|
#include "jni.h"
|
||||||
#include "jni_common.h"
|
#include "jni_common.h"
|
||||||
|
@ -42,10 +44,9 @@ static jlong latinime_Keyboard_setProximityInfo(JNIEnv *env, jobject object,
|
||||||
jfloat *sweetSpotCenterYs = safeGetFloatArrayElements(env, sweetSpotCenterYArray);
|
jfloat *sweetSpotCenterYs = safeGetFloatArrayElements(env, sweetSpotCenterYArray);
|
||||||
jfloat *sweetSpotRadii = safeGetFloatArrayElements(env, sweetSpotRadiusArray);
|
jfloat *sweetSpotRadii = safeGetFloatArrayElements(env, sweetSpotRadiusArray);
|
||||||
ProximityInfo *proximityInfo = new ProximityInfo(
|
ProximityInfo *proximityInfo = new ProximityInfo(
|
||||||
localeStr, maxProximityCharsSize, displayWidth,
|
localeStr, maxProximityCharsSize, displayWidth, displayHeight, gridWidth, gridHeight,
|
||||||
displayHeight, gridWidth, gridHeight, mostCommonkeyWidth,
|
mostCommonkeyWidth, (const int32_t*)proximityChars, keyCount,
|
||||||
(const int32_t*)proximityChars,
|
(const int32_t*)keyXCoordinates, (const int32_t*)keyYCoordinates,
|
||||||
keyCount, (const int32_t*)keyXCoordinates, (const int32_t*)keyYCoordinates,
|
|
||||||
(const int32_t*)keyWidths, (const int32_t*)keyHeights, (const int32_t*)keyCharCodes,
|
(const int32_t*)keyWidths, (const int32_t*)keyHeights, (const int32_t*)keyCharCodes,
|
||||||
(const float*)sweetSpotCenterXs, (const float*)sweetSpotCenterYs,
|
(const float*)sweetSpotCenterXs, (const float*)sweetSpotCenterYs,
|
||||||
(const float*)sweetSpotRadii);
|
(const float*)sweetSpotRadii);
|
||||||
|
|
|
@ -25,8 +25,9 @@
|
||||||
#include "jni_common.h"
|
#include "jni_common.h"
|
||||||
|
|
||||||
#ifdef USE_MMAP_FOR_DICTIONARY
|
#ifdef USE_MMAP_FOR_DICTIONARY
|
||||||
#include <sys/mman.h>
|
#include <cerrno>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
#else // USE_MMAP_FOR_DICTIONARY
|
#else // USE_MMAP_FOR_DICTIONARY
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#endif // USE_MMAP_FOR_DICTIONARY
|
#endif // USE_MMAP_FOR_DICTIONARY
|
||||||
|
|
|
@ -22,11 +22,8 @@
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "jni.h"
|
#include "jni.h"
|
||||||
#include "jni_common.h"
|
#include "jni_common.h"
|
||||||
#include "proximity_info.h"
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cerrno>
|
|
||||||
#include <cstdio>
|
|
||||||
|
|
||||||
using namespace latinime;
|
using namespace latinime;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue