aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/raw/main_en.dictbin1069220 -> 1069006 bytes
-rw-r--r--java/res/values-en/whitelist.xml16
-rw-r--r--java/src/com/android/inputmethod/keyboard/ProximityInfo.java10
3 files changed, 20 insertions, 6 deletions
diff --git a/java/res/raw/main_en.dict b/java/res/raw/main_en.dict
index 8f8b3cd82..516e7d51c 100644
--- a/java/res/raw/main_en.dict
+++ b/java/res/raw/main_en.dict
Binary files differ
diff --git a/java/res/values-en/whitelist.xml b/java/res/values-en/whitelist.xml
index 2cd350bee..9612aac5d 100644
--- a/java/res/values-en/whitelist.xml
+++ b/java/res/values-en/whitelist.xml
@@ -163,6 +163,14 @@
<item>not</item>
<item>255</item>
+ <item>mote</item>
+ <item>note</item>
+
+ <item>255</item>
+ <item>motes</item>
+ <item>notes</item>
+
+ <item>255</item>
<item>nit</item>
<item>not</item>
@@ -186,6 +194,14 @@
<item>tine</item>
<item>time</item>
+ <item>255</item>
+ <item>thong</item>
+ <item>thing</item>
+
+ <item>255</item>
+ <item>tome</item>
+ <item>time</item>
+
<!-- through additional proximity, 'uf' becomes 'of'. 'o' is not next to 'u' so anyone
typing 'uf' probably meant 'if', but 'of' is much more common and should be left
higher than 'if', hence the need for this entry. -->
diff --git a/java/src/com/android/inputmethod/keyboard/ProximityInfo.java b/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
index 9d8bace71..1207c3fcd 100644
--- a/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
+++ b/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
@@ -168,15 +168,13 @@ public class ProximityInfo {
final Rect hitBox = key.mHitBox;
final int row = hitBox.top / mKeyHeight;
if (row < touchPositionCorrection.mRadii.length) {
- final float hitBoxCenterX = (hitBox.left + hitBox.right) * 0.5f;
- final float hitBoxCenterY = (hitBox.top + hitBox.bottom) * 0.5f;
- final float hitBoxWidth = hitBox.right - hitBox.left;
- final float hitBoxHeight = hitBox.bottom - hitBox.top;
+ final int hitBoxWidth = hitBox.width();
+ final int hitBoxHeight = hitBox.height();
final float x = touchPositionCorrection.mXs[row];
final float y = touchPositionCorrection.mYs[row];
final float radius = touchPositionCorrection.mRadii[row];
- sweetSpotCenterXs[i] = hitBoxCenterX + x * hitBoxWidth;
- sweetSpotCenterYs[i] = hitBoxCenterY + y * hitBoxHeight;
+ sweetSpotCenterXs[i] = hitBox.exactCenterX() + x * hitBoxWidth;
+ sweetSpotCenterYs[i] = hitBox.exactCenterY() + y * hitBoxHeight;
sweetSpotRadii[i] = radius * FloatMath.sqrt(
hitBoxWidth * hitBoxWidth + hitBoxHeight * hitBoxHeight);
}