diff --git a/java/src/com/android/inputmethod/latin/KeyDetector.java b/java/src/com/android/inputmethod/latin/KeyDetector.java
index 5583e32..e443f27 100644
--- a/java/src/com/android/inputmethod/latin/KeyDetector.java
+++ b/java/src/com/android/inputmethod/latin/KeyDetector.java
@@ -19,11 +19,12 @@
 import android.inputmethodservice.Keyboard;
 import android.inputmethodservice.Keyboard.Key;
 
+import java.util.Arrays;
 import java.util.List;
 
 abstract class KeyDetector {
     protected Keyboard mKeyboard;
-    protected Key[] mKeys;
+    private Key[] mKeys;
 
     protected int mCorrectionX;
     protected int mCorrectionY;
@@ -50,6 +51,13 @@
         return y + mCorrectionY;
     }
 
+    protected Key[] getKeys() {
+        if (mKeys == null)
+            throw new IllegalStateException("keyboard isn't set");
+        // mKeyboard is guaranteed not null at setKeybaord() method
+        return mKeys;
+    }
+
     public void setProximityCorrectionEnabled(boolean enabled) {
         mProximityCorrectOn = enabled;
     }
@@ -62,7 +70,13 @@
         mProximityThresholdSquare = threshold * threshold;
     }
 
-    abstract public int[] newCodeArray();
+    public int[] newCodeArray() {
+        int[] codes = new int[getMaxNearbyKeys()];
+        Arrays.fill(codes, LatinKeyboardBaseView.NOT_A_KEY);
+        return codes;
+    }
+
+    abstract protected int getMaxNearbyKeys();
 
     abstract public int getKeyIndexAndNearbyCodes(int x, int y, int[] allKeys);
 }
\ No newline at end of file
diff --git a/java/src/com/android/inputmethod/latin/ProximityKeyDetector.java b/java/src/com/android/inputmethod/latin/ProximityKeyDetector.java
index 408e4e1..d17bedb 100644
--- a/java/src/com/android/inputmethod/latin/ProximityKeyDetector.java
+++ b/java/src/com/android/inputmethod/latin/ProximityKeyDetector.java
@@ -27,20 +27,15 @@
     private int[] mDistances = new int[MAX_NEARBY_KEYS];
 
     @Override
-    public int[] newCodeArray() {
-        int[] codes = new int[MAX_NEARBY_KEYS];
-        Arrays.fill(codes, LatinKeyboardBaseView.NOT_A_KEY);
-        return codes;
+    protected int getMaxNearbyKeys() {
+        return MAX_NEARBY_KEYS;
     }
 
     @Override
     public int getKeyIndexAndNearbyCodes(int x, int y, int[] allKeys) {
+        final Key[] keys = getKeys();
         final int touchX = getTouchX(x);
         final int touchY = getTouchY(y);
-        final Key[] keys = mKeys;
-        if (keys == null)
-            throw new IllegalStateException("keyboard isn't set");
-        // mKeyboard is guaranteed not null at setKeybaord() method
         int primaryIndex = LatinKeyboardBaseView.NOT_A_KEY;
         int closestKey = LatinKeyboardBaseView.NOT_A_KEY;
         int closestKeyDist = mProximityThresholdSquare + 1;
