aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp')
-rw-r--r--native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp44
1 files changed, 19 insertions, 25 deletions
diff --git a/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp b/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp
index 9eb437c06..74390ccdf 100644
--- a/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp
+++ b/native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp
@@ -1,32 +1,28 @@
/*
-**
-** Copyright 2011, 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.
-*/
+ * Copyright (C) 2011, 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.
+ */
#define LOG_TAG "LatinIME: jni: ProximityInfo"
+#include <string>
+
#include "com_android_inputmethod_keyboard_ProximityInfo.h"
#include "jni.h"
#include "jni_common.h"
#include "proximity_info.h"
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string>
-
namespace latinime {
static jlong latinime_Keyboard_setProximityInfo(JNIEnv *env, jobject object,
@@ -48,10 +44,9 @@ static jlong latinime_Keyboard_setProximityInfo(JNIEnv *env, jobject object,
jfloat *sweetSpotCenterYs = safeGetFloatArrayElements(env, sweetSpotCenterYArray);
jfloat *sweetSpotRadii = safeGetFloatArrayElements(env, sweetSpotRadiusArray);
ProximityInfo *proximityInfo = new ProximityInfo(
- localeStr, maxProximityCharsSize, displayWidth,
- displayHeight, gridWidth, gridHeight, mostCommonkeyWidth,
- (const int32_t*)proximityChars,
- keyCount, (const int32_t*)keyXCoordinates, (const int32_t*)keyYCoordinates,
+ localeStr, maxProximityCharsSize, displayWidth, displayHeight, gridWidth, gridHeight,
+ mostCommonkeyWidth, (const int32_t*)proximityChars, keyCount,
+ (const int32_t*)keyXCoordinates, (const int32_t*)keyYCoordinates,
(const int32_t*)keyWidths, (const int32_t*)keyHeights, (const int32_t*)keyCharCodes,
(const float*)sweetSpotCenterXs, (const float*)sweetSpotCenterYs,
(const float*)sweetSpotRadii);
@@ -85,5 +80,4 @@ int register_ProximityInfo(JNIEnv *env) {
return registerNativeMethods(env, kClassPathName, sKeyboardMethods,
sizeof(sKeyboardMethods) / sizeof(sKeyboardMethods[0]));
}
-
} // namespace latinime