Merge "Separate leftward arrow from "add to dictionary" hint text"
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 550f5ac..3d4e776 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -424,5 +424,7 @@
             <enum name="number" value="9"  />
         </attr>
         <attr name="elementKeyboard" format="reference"/>
+        <!-- Enable proximity characters correction. Disabled by default. -->
+        <attr name="enableProximityCharsCorrection" format="boolean" />
     </declare-styleable>
 </resources>
diff --git a/java/res/xml-ar/keyboard_set.xml b/java/res/xml-ar/keyboard_set.xml
index 7b70f63..c37d128 100644
--- a/java/res/xml-ar/keyboard_set.xml
+++ b/java/res/xml-ar/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="ar" >
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_arabic" />
+        latin:elementKeyboard="@xml/kbd_arabic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-be/keyboard_set.xml b/java/res/xml-be/keyboard_set.xml
index 8232346..1b865ed 100644
--- a/java/res/xml-be/keyboard_set.xml
+++ b/java/res/xml-be/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="be">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_east_slavic" />
+        latin:elementKeyboard="@xml/kbd_east_slavic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-bg/keyboard_set.xml b/java/res/xml-bg/keyboard_set.xml
index 49914d5..e824826 100644
--- a/java/res/xml-bg/keyboard_set.xml
+++ b/java/res/xml-bg/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="bg">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_bulgarian" />
+        latin:elementKeyboard="@xml/kbd_bulgarian"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-cs/keyboard_set.xml b/java/res/xml-cs/keyboard_set.xml
index b453516..6dea17a 100644
--- a/java/res/xml-cs/keyboard_set.xml
+++ b/java/res/xml-cs/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="cs">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz" />
+        latin:elementKeyboard="@xml/kbd_qwertz"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-da/keyboard_set.xml b/java/res/xml-da/keyboard_set.xml
index 9b512ec..cc1096f 100644
--- a/java/res/xml-da/keyboard_set.xml
+++ b/java/res/xml-da/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="da">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic" />
+        latin:elementKeyboard="@xml/kbd_nordic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-de-rZZ/keyboard_set.xml b/java/res/xml-de-rZZ/keyboard_set.xml
index 635884d..e874bda 100644
--- a/java/res/xml-de-rZZ/keyboard_set.xml
+++ b/java/res/xml-de-rZZ/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="de">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-de/keyboard_set.xml b/java/res/xml-de/keyboard_set.xml
index 485e63f..3b648e5 100644
--- a/java/res/xml-de/keyboard_set.xml
+++ b/java/res/xml-de/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="de">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz" />
+        latin:elementKeyboard="@xml/kbd_qwertz"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-el/keyboard_set.xml b/java/res/xml-el/keyboard_set.xml
index 19ecb77..5809e7f 100644
--- a/java/res/xml-el/keyboard_set.xml
+++ b/java/res/xml-el/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="el">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_greek" />
+        latin:elementKeyboard="@xml/kbd_greek"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-es/keyboard_set.xml b/java/res/xml-es/keyboard_set.xml
index 9cf208b..fd968fc 100644
--- a/java/res/xml-es/keyboard_set.xml
+++ b/java/res/xml-es/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="es,es_US">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_spanish" />
+        latin:elementKeyboard="@xml/kbd_spanish"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_spanish_symbols" />
diff --git a/java/res/xml-et/keyboard_set.xml b/java/res/xml-et/keyboard_set.xml
index 9ccef8c..ddddcc6 100644
--- a/java/res/xml-et/keyboard_set.xml
+++ b/java/res/xml-et/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="et">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic" />
+        latin:elementKeyboard="@xml/kbd_nordic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-fa/keyboard_set.xml b/java/res/xml-fa/keyboard_set.xml
index cb62b0d..0d16f8d 100644
--- a/java/res/xml-fa/keyboard_set.xml
+++ b/java/res/xml-fa/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="fa" >
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_farsi" />
+        latin:elementKeyboard="@xml/kbd_farsi"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-fi/keyboard_set.xml b/java/res/xml-fi/keyboard_set.xml
index 45968af..c40e828 100644
--- a/java/res/xml-fi/keyboard_set.xml
+++ b/java/res/xml-fi/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="fi">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic" />
+        latin:elementKeyboard="@xml/kbd_nordic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-fr-rCA/keyboard_set.xml b/java/res/xml-fr-rCA/keyboard_set.xml
index ea6ac8f..8d780f5 100644
--- a/java/res/xml-fr-rCA/keyboard_set.xml
+++ b/java/res/xml-fr-rCA/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="fr_CA">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-fr-rCH/keyboard_set.xml b/java/res/xml-fr-rCH/keyboard_set.xml
index 751900b..601d2bc 100644
--- a/java/res/xml-fr-rCH/keyboard_set.xml
+++ b/java/res/xml-fr-rCH/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="fr_CH">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz" />
+        latin:elementKeyboard="@xml/kbd_qwertz"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-fr/keyboard_set.xml b/java/res/xml-fr/keyboard_set.xml
index fa1339b..4b827ca 100644
--- a/java/res/xml-fr/keyboard_set.xml
+++ b/java/res/xml-fr/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="fr">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_azerty" />
+        latin:elementKeyboard="@xml/kbd_azerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_azerty_symbols" />
diff --git a/java/res/xml-hi/keyboard_set.xml b/java/res/xml-hi/keyboard_set.xml
index 804323a..cb4dece 100644
--- a/java/res/xml-hi/keyboard_set.xml
+++ b/java/res/xml-hi/keyboard_set.xml
@@ -23,6 +23,23 @@
     latin:keyboardLocale="hi">
     <Element
         latin:elementName="alphabet"
+        latin:elementKeyboard="@xml/kbd_hindi"
+        latin:enableProximityCharsCorrection="true" />
+    <Element
+        latin:elementName="alphabetAutomaticShifted"
+        latin:elementKeyboard="@xml/kbd_hindi"
+        latin:enableProximityCharsCorrection="true" />
+    <!-- On these shifted alphabet layouts the proximity characters correction should be disabled
+         because the letters on these layouts aren't the ones in different case of the above
+         unshifted layouts. -->
+    <Element
+        latin:elementName="alphabetManualShifted"
+        latin:elementKeyboard="@xml/kbd_hindi" />
+    <Element
+        latin:elementName="alphabetShiftLocked"
+        latin:elementKeyboard="@xml/kbd_hindi" />
+    <Element
+        latin:elementName="alphabetShiftLockShifted"
         latin:elementKeyboard="@xml/kbd_hindi" />
     <Element
         latin:elementName="symbols"
diff --git a/java/res/xml-hr/keyboard_set.xml b/java/res/xml-hr/keyboard_set.xml
index e17aefd..5116440 100644
--- a/java/res/xml-hr/keyboard_set.xml
+++ b/java/res/xml-hr/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="hr">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz" />
+        latin:elementKeyboard="@xml/kbd_qwertz"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-hu/keyboard_set.xml b/java/res/xml-hu/keyboard_set.xml
index 0f6e575..2139ac7 100644
--- a/java/res/xml-hu/keyboard_set.xml
+++ b/java/res/xml-hu/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="hu">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz" />
+        latin:elementKeyboard="@xml/kbd_qwertz"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-is/keyboard_set.xml b/java/res/xml-is/keyboard_set.xml
index 077bc6b..c2ac944 100644
--- a/java/res/xml-is/keyboard_set.xml
+++ b/java/res/xml-is/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="is">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic" />
+        latin:elementKeyboard="@xml/kbd_nordic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-iw/keyboard_set.xml b/java/res/xml-iw/keyboard_set.xml
index 501ba96..d1da41a 100644
--- a/java/res/xml-iw/keyboard_set.xml
+++ b/java/res/xml-iw/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="iw">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_hebrew" />
+        latin:elementKeyboard="@xml/kbd_hebrew"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-ka/keyboard_set.xml b/java/res/xml-ka/keyboard_set.xml
index 1b0bc2d..2be9468 100644
--- a/java/res/xml-ka/keyboard_set.xml
+++ b/java/res/xml-ka/keyboard_set.xml
@@ -23,6 +23,23 @@
     latin:keyboardLocale="ka">
     <Element
         latin:elementName="alphabet"
+        latin:elementKeyboard="@xml/kbd_georgian"
+        latin:enableProximityCharsCorrection="true" />
+    <Element
+        latin:elementName="alphabetAutomaticShifted"
+        latin:elementKeyboard="@xml/kbd_georgian"
+        latin:enableProximityCharsCorrection="true" />
+    <!-- On these shifted alphabet layouts the proximity characters correction should be disabled
+         because the letters on these layouts aren't the ones in different case of the above
+         unshifted layouts. -->
+    <Element
+        latin:elementName="alphabetManualShifted"
+        latin:elementKeyboard="@xml/kbd_georgian" />
+    <Element
+        latin:elementName="alphabetShiftLocked"
+        latin:elementKeyboard="@xml/kbd_georgian" />
+    <Element
+        latin:elementName="alphabetShiftLockShifted"
         latin:elementKeyboard="@xml/kbd_georgian" />
     <Element
         latin:elementName="symbols"
diff --git a/java/res/xml-ky/keyboard_set.xml b/java/res/xml-ky/keyboard_set.xml
index 71215c5..0226bda 100644
--- a/java/res/xml-ky/keyboard_set.xml
+++ b/java/res/xml-ky/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="ky">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_east_slavic" />
+        latin:elementKeyboard="@xml/kbd_east_slavic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-mk/keyboard_set.xml b/java/res/xml-mk/keyboard_set.xml
index 5eabe8c..9387489 100644
--- a/java/res/xml-mk/keyboard_set.xml
+++ b/java/res/xml-mk/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="mk">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_south_slavic" />
+        latin:elementKeyboard="@xml/kbd_south_slavic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-nb/keyboard_set.xml b/java/res/xml-nb/keyboard_set.xml
index 2d585a9..1675ed2 100644
--- a/java/res/xml-nb/keyboard_set.xml
+++ b/java/res/xml-nb/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="nb">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic" />
+        latin:elementKeyboard="@xml/kbd_nordic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-pl/keyboard_set.xml b/java/res/xml-pl/keyboard_set.xml
index 6d27379..fb0d13b 100644
--- a/java/res/xml-pl/keyboard_set.xml
+++ b/java/res/xml-pl/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="pl">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-pt/keyboard_set.xml b/java/res/xml-pt/keyboard_set.xml
index 65f9634..f8140aa 100644
--- a/java/res/xml-pt/keyboard_set.xml
+++ b/java/res/xml-pt/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="pt">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-ro/keyboard_set.xml b/java/res/xml-ro/keyboard_set.xml
index 6c34966..73030fd 100644
--- a/java/res/xml-ro/keyboard_set.xml
+++ b/java/res/xml-ro/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="ro">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-ru/keyboard_set.xml b/java/res/xml-ru/keyboard_set.xml
index 76daf32..393d58e 100644
--- a/java/res/xml-ru/keyboard_set.xml
+++ b/java/res/xml-ru/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="ru">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_east_slavic" />
+        latin:elementKeyboard="@xml/kbd_east_slavic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-sk/keyboard_set.xml b/java/res/xml-sk/keyboard_set.xml
index b283d96..db27b61 100644
--- a/java/res/xml-sk/keyboard_set.xml
+++ b/java/res/xml-sk/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="sk">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-sl/keyboard_set.xml b/java/res/xml-sl/keyboard_set.xml
index dbb2782..31f4714 100644
--- a/java/res/xml-sl/keyboard_set.xml
+++ b/java/res/xml-sl/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="sl">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-sr/keyboard_set.xml b/java/res/xml-sr/keyboard_set.xml
index 71dedf4..f59f3a9 100644
--- a/java/res/xml-sr/keyboard_set.xml
+++ b/java/res/xml-sr/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="sr">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_south_slavic" />
+        latin:elementKeyboard="@xml/kbd_south_slavic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-sv/keyboard_set.xml b/java/res/xml-sv/keyboard_set.xml
index 7135fc5..2b106e0 100644
--- a/java/res/xml-sv/keyboard_set.xml
+++ b/java/res/xml-sv/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="sv">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic" />
+        latin:elementKeyboard="@xml/kbd_nordic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-th/keyboard_set.xml b/java/res/xml-th/keyboard_set.xml
index 99d75fe..7362d87 100644
--- a/java/res/xml-th/keyboard_set.xml
+++ b/java/res/xml-th/keyboard_set.xml
@@ -23,6 +23,23 @@
     latin:keyboardLocale="th">
     <Element
         latin:elementName="alphabet"
+        latin:elementKeyboard="@xml/kbd_thai"
+        latin:enableProximityCharsCorrection="true" />
+    <Element
+        latin:elementName="alphabetAutomaticShifted"
+        latin:elementKeyboard="@xml/kbd_thai"
+        latin:enableProximityCharsCorrection="true" />
+    <!-- On these shifted alphabet layouts the proximity characters correction should be disabled
+         because the letters on these layouts aren't the ones in different case of the above
+         unshifted layouts. -->
+    <Element
+        latin:elementName="alphabetManualShifted"
+        latin:elementKeyboard="@xml/kbd_thai" />
+    <Element
+        latin:elementName="alphabetShiftLocked"
+        latin:elementKeyboard="@xml/kbd_thai" />
+    <Element
+        latin:elementName="alphabetShiftLockShifted"
         latin:elementKeyboard="@xml/kbd_thai" />
     <Element
         latin:elementName="symbols"
diff --git a/java/res/xml-tr/keyboard_set.xml b/java/res/xml-tr/keyboard_set.xml
index da79758..01822a9 100644
--- a/java/res/xml-tr/keyboard_set.xml
+++ b/java/res/xml-tr/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="tr">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-uk/keyboard_set.xml b/java/res/xml-uk/keyboard_set.xml
index a7cfad1..d782c98 100644
--- a/java/res/xml-uk/keyboard_set.xml
+++ b/java/res/xml-uk/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="uk">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_east_slavic" />
+        latin:elementKeyboard="@xml/kbd_east_slavic"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml-vi/keyboard_set.xml b/java/res/xml-vi/keyboard_set.xml
index 6d38eb1..e5f744f 100644
--- a/java/res/xml-vi/keyboard_set.xml
+++ b/java/res/xml-vi/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="vi">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml/key_azerty_quote.xml b/java/res/xml/key_azerty_quote.xml
index e1d1804..8c44f78 100644
--- a/java/res/xml/key_azerty_quote.xml
+++ b/java/res/xml/key_azerty_quote.xml
@@ -26,7 +26,7 @@
             latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
         >
             <Key
-                latin:keyLabel=":" />
+                latin:keyLabel="\?" />
         </case>
         <default>
             <Key
diff --git a/java/res/xml/keyboard_set.xml b/java/res/xml/keyboard_set.xml
index 1398b13..83f9ea0 100644
--- a/java/res/xml/keyboard_set.xml
+++ b/java/res/xml/keyboard_set.xml
@@ -23,7 +23,8 @@
     latin:keyboardLocale="en_GB,en_US">
     <Element
         latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty" />
+        latin:elementKeyboard="@xml/kbd_qwerty"
+        latin:enableProximityCharsCorrection="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java b/java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java
index bf5f201..a4ff823 100644
--- a/java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java
+++ b/java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java
@@ -267,12 +267,13 @@
         final InputMethodSubtypeCompatWrapper currentIms = getCurrentInputMethodSubtype();
         final List<InputMethodInfoCompatWrapper> imiList = getEnabledInputMethodList();
         imiList.remove(myImi);
+        final PackageManager pm = mPackageManager;
         Collections.sort(imiList, new Comparator<InputMethodInfoCompatWrapper>() {
             @Override
             public int compare(InputMethodInfoCompatWrapper imi1,
                     InputMethodInfoCompatWrapper imi2) {
-                final CharSequence imiId1 = imi1.loadLabel(mPackageManager) + "/" + imi1.getId();
-                final CharSequence imiId2 = imi2.loadLabel(mPackageManager) + "/" + imi2.getId();
+                final CharSequence imiId1 = imi1.loadLabel(pm) + "/" + imi1.getId();
+                final CharSequence imiId2 = imi2.loadLabel(pm) + "/" + imi2.getId();
                 return imiId1.toString().compareTo(imiId2.toString());
             }
         });
@@ -302,6 +303,7 @@
             index++;
         }
 
+        final InputMethodServiceCompatWrapper service = mService;
         final OnClickListener buttonListener = new OnClickListener() {
             @Override
             public void onClick(DialogInterface di, int whichButton) {
@@ -309,10 +311,9 @@
                 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                         | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
                         | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-                mService.startActivity(intent);
+                service.startActivity(intent);
             }
         };
-        final InputMethodServiceCompatWrapper service = mService;
         final IBinder token = service.getWindow().getWindow().getAttributes().token;
         final OnClickListener selectionListener = new OnClickListener() {
             @Override
diff --git a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
index a9e4840..df55aee 100644
--- a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
+++ b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
@@ -129,7 +129,7 @@
         // TODO: Share the implementation for checking typed word validity between the IME
         // and the spell checker.
         final int flag = (sameAsTyped && !suggestedWords.mTypedWordValid)
-                ? ((int)OBJ_FLAG_EASY_CORRECT | (int)OBJ_FLAG_MISSPELLED)
+                ? (OBJ_FLAG_EASY_CORRECT | OBJ_FLAG_MISSPELLED)
                 : 0;
 
         final Object[] args =
diff --git a/java/src/com/android/inputmethod/compat/SuggestionsInfoCompatUtils.java b/java/src/com/android/inputmethod/compat/SuggestionsInfoCompatUtils.java
index 6a0d4dd..723ec28 100644
--- a/java/src/com/android/inputmethod/compat/SuggestionsInfoCompatUtils.java
+++ b/java/src/com/android/inputmethod/compat/SuggestionsInfoCompatUtils.java
@@ -24,7 +24,7 @@
     private static final Field FIELD_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS = CompatUtils.getField(
             SuggestionsInfo.class, "RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS");
     private static final Integer OBJ_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS = (Integer) CompatUtils
-            .getFieldValue(null, null, FIELD_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS);;
+            .getFieldValue(null, null, FIELD_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS);
     private static final int RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS =
             OBJ_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS != null
                     ? OBJ_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS : 0;
@@ -34,7 +34,7 @@
 
     /**
      * Returns the flag value of the attributes of the suggestions that can be obtained by
-     * {@link #getSuggestionsAttributes}: this tells that the text service thinks
+     * {@link SuggestionsInfo#getSuggestionsAttributes()}: this tells that the text service thinks
      * the result suggestions include highly recommended ones.
      */
     public static int getValueOf_RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS() {
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index bc48b85..67e4e4a 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -130,6 +130,7 @@
     private final HashMap<Integer, Key> mKeyCache = new HashMap<Integer, Key>();
 
     private final ProximityInfo mProximityInfo;
+    private final boolean mProximityCharsCorrectionEnabled;
 
     public Keyboard(Params params) {
         mId = params.mId;
@@ -153,6 +154,19 @@
         mProximityInfo = new ProximityInfo(params.mId.mLocale.toString(),
                 params.GRID_WIDTH, params.GRID_HEIGHT, mOccupiedWidth, mOccupiedHeight,
                 mMostCommonKeyWidth, mMostCommonKeyHeight, mKeys, params.mTouchPositionCorrection);
+        mProximityCharsCorrectionEnabled = params.mProximityCharsCorrectionEnabled;
+    }
+
+    public boolean hasProximityCharsCorrection(int code) {
+        if (!mProximityCharsCorrectionEnabled) {
+            return false;
+        }
+        // Note: The native code has the main keyboard layout only at this moment.
+        // TODO: Figure out how to handle proximity characters information of all layouts.
+        final boolean canAssumeNativeHasProximityCharsInfoOfAllKeys = (
+                mId.mElementId == KeyboardId.ELEMENT_ALPHABET
+                || mId.mElementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED);
+        return canAssumeNativeHasProximityCharsInfoOfAllKeys || Character.isLetter(code);
     }
 
     public ProximityInfo getProximityInfo() {
@@ -230,6 +244,8 @@
         public int mMostCommonKeyHeight = 0;
         public int mMostCommonKeyWidth = 0;
 
+        public boolean mProximityCharsCorrectionEnabled;
+
         public final TouchPositionCorrection mTouchPositionCorrection =
                 new TouchPositionCorrection();
 
@@ -647,6 +663,10 @@
             mParams.mTouchPositionCorrection.setEnabled(enabled);
         }
 
+        public void setProximityCharsCorrectionEnabled(boolean enabled) {
+            mParams.mProximityCharsCorrectionEnabled = enabled;
+        }
+
         public Keyboard build() {
             return new Keyboard(mParams);
         }
@@ -753,9 +773,9 @@
                 params.mMaxMoreKeysKeyboardColumn = keyAttr.getInt(
                         R.styleable.Keyboard_Key_maxMoreKeysColumn, 5);
 
+                params.mThemeId = keyboardAttr.getInt(R.styleable.Keyboard_themeId, 0);
                 params.mIconsSet.loadIcons(keyboardAttr);
 
-                params.mThemeId = keyboardAttr.getInt(R.styleable.Keyboard_themeId, 0);
                 final int resourceId = keyboardAttr.getResourceId(
                         R.styleable.Keyboard_touchPositionCorrectionData, 0);
                 params.mTouchPositionCorrection.setEnabled(resourceId != 0);
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java b/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
index 16b4eaf..275aacf 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
@@ -42,13 +42,13 @@
      *
      * @param primaryCode this is the code of the key that was pressed
      * @param x x-coordinate pixel of touched event. If {@link #onCodeInput} is not called by
-     *            {@link PointerTracker#onTouchEvent} or so, the value should be
-     *            {@link #NOT_A_TOUCH_COORDINATE}. If it's called on insertion from the suggestion
-     *            strip, it should be {@link #SUGGESTION_STRIP_COORDINATE}.
+     *            {@link PointerTracker} or so, the value should be {@link #NOT_A_TOUCH_COORDINATE}.
+     *            If it's called on insertion from the suggestion strip, it should be
+     *            {@link #SUGGESTION_STRIP_COORDINATE}.
      * @param y y-coordinate pixel of touched event. If {@link #onCodeInput} is not called by
-     *            {@link PointerTracker#onTouchEvent} or so, the value should be
-     *            {@link #NOT_A_TOUCH_COORDINATE}. If it's called on insertion from the suggestion
-     *            strip, it should be {@link #SUGGESTION_STRIP_COORDINATE}.
+     *            {@link PointerTracker} or so, the value should be {@link #NOT_A_TOUCH_COORDINATE}.
+     *            If it's called on insertion from the suggestion strip, it should be
+     *            {@link #SUGGESTION_STRIP_COORDINATE}.
      */
     public void onCodeInput(int primaryCode, int x, int y);
 
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
index bb11a9b..1bf2fc0 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
@@ -28,6 +28,7 @@
 
 import com.android.inputmethod.compat.EditorInfoCompatUtils;
 import com.android.inputmethod.compat.InputTypeCompatUtils;
+import com.android.inputmethod.keyboard.KeyboardSet.Params.ElementParams;
 import com.android.inputmethod.latin.LatinIME;
 import com.android.inputmethod.latin.LatinImeLogger;
 import com.android.inputmethod.latin.LocaleUtils;
@@ -53,7 +54,7 @@
     private static final String TAG = KeyboardSet.class.getSimpleName();
     private static final boolean DEBUG_CACHE = LatinImeLogger.sDBG;
 
-    private static final String TAG_KEYBOARD_SET = TAG;
+    private static final String TAG_KEYBOARD_SET = "KeyboardSet";
     private static final String TAG_ELEMENT = "Element";
 
     private final Context mContext;
@@ -104,10 +105,14 @@
         Locale mLocale;
         int mOrientation;
         int mWidth;
-        // KeyboardSet element id to keyboard layout XML id map.
-        final HashMap<Integer, Integer> mKeyboardSetElementIdToXmlIdMap =
-                new HashMap<Integer, Integer>();
-        Params() {}
+        // KeyboardSet element id to element's parameters map.
+        final HashMap<Integer, ElementParams> mKeyboardSetElementIdToParamsMap =
+                new HashMap<Integer, ElementParams>();
+
+        static class ElementParams {
+            int mKeyboardXmlId;
+            boolean mProximityCharsCorrectionEnabled;
+        }
     }
 
     public static void clearKeyboardCache() {
@@ -141,20 +146,21 @@
             break;
         }
 
-        Integer keyboardXmlId = mParams.mKeyboardSetElementIdToXmlIdMap.get(keyboardSetElementId);
-        if (keyboardXmlId == null) {
-            keyboardXmlId = mParams.mKeyboardSetElementIdToXmlIdMap.get(
+        ElementParams elementParams = mParams.mKeyboardSetElementIdToParamsMap.get(
+                keyboardSetElementId);
+        if (elementParams == null) {
+            elementParams = mParams.mKeyboardSetElementIdToParamsMap.get(
                     KeyboardId.ELEMENT_ALPHABET);
         }
         final KeyboardId id = getKeyboardId(keyboardSetElementId);
         try {
-            return getKeyboard(mContext, keyboardXmlId, id);
+            return getKeyboard(mContext, elementParams, id);
         } catch (RuntimeException e) {
             throw new KeyboardSetException(e, id);
         }
     }
 
-    private Keyboard getKeyboard(Context context, int keyboardXmlId, KeyboardId id) {
+    private Keyboard getKeyboard(Context context, ElementParams elementParams, KeyboardId id) {
         final Resources res = context.getResources();
         final SoftReference<Keyboard> ref = sKeyboardCache.get(id);
         Keyboard keyboard = (ref == null) ? null : ref.get();
@@ -166,8 +172,10 @@
                 if (id.isAlphabetKeyboard()) {
                     builder.setAutoGenerate(sKeysCache);
                 }
-                builder.load(keyboardXmlId, id);
+                builder.load(elementParams.mKeyboardXmlId, id);
                 builder.setTouchPositionCorrectionEnabled(mParams.mTouchPositionCorrectionEnabled);
+                builder.setProximityCharsCorrectionEnabled(
+                        elementParams.mProximityCharsCorrectionEnabled);
                 keyboard = builder.build();
             } finally {
                 LocaleUtils.setSystemLocale(res, savedLocale);
@@ -331,11 +339,14 @@
                         TAG_ELEMENT, parser);
                 XmlParseUtils.checkEndTag(TAG_ELEMENT, parser);
 
+                final ElementParams elementParams = new ElementParams();
                 final int elementName = a.getInt(
                         R.styleable.KeyboardSet_Element_elementName, 0);
-                final int elementKeyboard = a.getResourceId(
+                elementParams.mKeyboardXmlId = a.getResourceId(
                         R.styleable.KeyboardSet_Element_elementKeyboard, 0);
-                mParams.mKeyboardSetElementIdToXmlIdMap.put(elementName, elementKeyboard);
+                elementParams.mProximityCharsCorrectionEnabled = a.getBoolean(
+                        R.styleable.KeyboardSet_Element_enableProximityCharsCorrection, false);
+                mParams.mKeyboardSetElementIdToParamsMap.put(elementName, elementParams);
             } finally {
                 a.recycle();
             }
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
index 2495b54..e60fc95 100644
--- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
@@ -47,7 +47,9 @@
             new KeyboardActionListener.Adapter() {
         @Override
         public void onCodeInput(int primaryCode, int x, int y) {
-            mListener.onCodeInput(primaryCode, x, y);
+            // Because a more keys keyboard doesn't need proximity characters correction, we don't
+            // send touch event coordinates.
+            mListener.onCodeInput(primaryCode, NOT_A_TOUCH_COORDINATE, NOT_A_TOUCH_COORDINATE);
         }
 
         @Override
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
index 8ec4405..311d3dc 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
@@ -252,7 +252,7 @@
      * also apply.
      *
      * @param input the stream to be copied.
-     * @param outputFile an outputstream to copy the data to.
+     * @param output an output stream to copy the data to.
      */
     private static void checkMagicAndCopyFileTo(final BufferedInputStream input,
             final FileOutputStream output) throws FileNotFoundException, IOException {
diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java
index 79bf338..9d26a23 100644
--- a/java/src/com/android/inputmethod/latin/Dictionary.java
+++ b/java/src/com/android/inputmethod/latin/Dictionary.java
@@ -38,7 +38,7 @@
 
     /**
      * Interface to be implemented by classes requesting words to be fetched from the dictionary.
-     * @see #getWords(WordComposer, WordCallback)
+     * @see #getWords(WordComposer, WordCallback, ProximityInfo)
      */
     public interface WordCallback {
         /**
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 86c1539..e6094d9 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -68,7 +68,6 @@
 import com.android.inputmethod.keyboard.KeyboardSwitcher;
 import com.android.inputmethod.keyboard.KeyboardView;
 import com.android.inputmethod.keyboard.LatinKeyboardView;
-import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils;
 import com.android.inputmethod.latin.define.ProductionFlag;
 import com.android.inputmethod.latin.suggestions.SuggestionsView;
 
@@ -1318,7 +1317,13 @@
             if (mSettingsValues.isWordSeparator(primaryCode)) {
                 didAutoCorrect = handleSeparator(primaryCode, x, y, spaceState);
             } else {
-                handleCharacter(primaryCode, x, y, spaceState);
+                final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
+                if (keyboard != null && keyboard.hasProximityCharsCorrection(primaryCode)) {
+                    handleCharacter(primaryCode, x, y, spaceState);
+                } else {
+                    handleCharacter(primaryCode, NOT_A_TOUCH_COORDINATE, NOT_A_TOUCH_COORDINATE,
+                            spaceState);
+                }
             }
             mExpectingUpdateSelection = true;
             mShouldSwitchToLastSubtype = true;
diff --git a/java/src/com/android/inputmethod/latin/LatinImeLogger.java b/java/src/com/android/inputmethod/latin/LatinImeLogger.java
index 732efad..dc0868e 100644
--- a/java/src/com/android/inputmethod/latin/LatinImeLogger.java
+++ b/java/src/com/android/inputmethod/latin/LatinImeLogger.java
@@ -16,7 +16,6 @@
 
 package com.android.inputmethod.latin;
 
-import android.content.Context;
 import android.content.SharedPreferences;
 import android.view.inputmethod.EditorInfo;
 
diff --git a/java/src/com/android/inputmethod/latin/LocaleUtils.java b/java/src/com/android/inputmethod/latin/LocaleUtils.java
index e05b47c..cf60089 100644
--- a/java/src/com/android/inputmethod/latin/LocaleUtils.java
+++ b/java/src/com/android/inputmethod/latin/LocaleUtils.java
@@ -168,12 +168,14 @@
      * @param newLocale the locale to change to.
      * @return the old locale.
      */
-    public static Locale setSystemLocale(final Resources res, final Locale newLocale) {
+    public static synchronized Locale setSystemLocale(final Resources res, final Locale newLocale) {
         final Configuration conf = res.getConfiguration();
-        final Locale saveLocale = conf.locale;
-        conf.locale = newLocale;
-        res.updateConfiguration(conf, res.getDisplayMetrics());
-        return saveLocale;
+        final Locale oldLocale = conf.locale;
+        if (newLocale != null && !newLocale.equals(oldLocale)) {
+            conf.locale = newLocale;
+            res.updateConfiguration(conf, res.getDisplayMetrics());
+        }
+        return oldLocale;
     }
 
     private static final HashMap<String, Locale> sLocaleCache = new HashMap<String, Locale>();
diff --git a/java/src/com/android/inputmethod/latin/ResearchLogger.java b/java/src/com/android/inputmethod/latin/ResearchLogger.java
index 0694ffe..570333c 100644
--- a/java/src/com/android/inputmethod/latin/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/latin/ResearchLogger.java
@@ -113,6 +113,7 @@
 
             close();
             mFile = new File(directory, filename);
+            mFile.setReadable(false, false);
             boolean append = true;
             if (mFile.exists() && mFile.lastModified() + LOGFILE_PURGE_INTERVAL <
                     System.currentTimeMillis()) {
@@ -178,8 +179,8 @@
         }
         if (prefs != null) {
             sIsLogging = prefs.getBoolean(PREF_USABILITY_STUDY_MODE, false);
+            prefs.registerOnSharedPreferenceChangeListener(this);
         }
-        prefs.registerOnSharedPreferenceChangeListener(this);
     }
 
     /**
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 555a49e..bd8532e 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -144,9 +144,7 @@
     }
 
     /**
-     * Add a new keystroke, with codes[0] containing the pressed key's unicode and the rest of
-     * the array containing unicode for adjacent keys, sorted by reducing probability/proximity.
-     * @param codes the array of unicode values
+     * Add a new keystroke, with the pressed key's code point with the touch point coordinates.
      */
     private void add(int primaryCode, int keyX, int keyY) {
         final int newIndex = size();