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-ca/strings.xml2
-rw-r--r--java/res/values-cs/strings.xml8
-rw-r--r--java/res/values-el/strings.xml2
-rw-r--r--java/res/values-en/whitelist.xml20
-rw-r--r--java/res/values-es-rUS/strings.xml2
-rw-r--r--java/res/values-hi/strings.xml2
-rw-r--r--java/res/values-hu/strings.xml2
-rw-r--r--java/res/values-land/keyboard-heights.xml5
-rw-r--r--java/res/values-sk/strings.xml2
-rw-r--r--java/res/values-sw600dp/keyboard-heights.xml28
-rw-r--r--java/res/values-sw768dp-land/keyboard-heights.xml28
-rw-r--r--java/res/values-sw768dp/keyboard-heights.xml28
-rw-r--r--java/res/values-th/strings.xml2
-rw-r--r--java/res/values-uk/strings.xml2
-rw-r--r--java/res/values-zh-rCN/strings.xml2
-rw-r--r--java/res/values/keyboard-heights.xml5
-rw-r--r--java/res/values/phantom_sudden_move_event_device_list.xml (renamed from java/res/values-sw600dp-land/keyboard-heights.xml)10
-rw-r--r--java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java6
-rw-r--r--java/src/com/android/inputmethod/keyboard/PointerTracker.java14
-rw-r--r--java/src/com/android/inputmethod/keyboard/ProximityInfo.java10
-rw-r--r--java/src/com/android/inputmethod/latin/Settings.java5
-rw-r--r--java/src/com/android/inputmethod/latin/TargetApplicationGetter.java1
23 files changed, 69 insertions, 117 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-ca/strings.xml b/java/res/values-ca/strings.xml
index e0b32add3..6a9adb165 100644
--- a/java/res/values-ca/strings.xml
+++ b/java/res/values-ca/strings.xml
@@ -134,7 +134,7 @@
<string name="save" msgid="7646738597196767214">"Desa"</string>
<string name="subtype_locale" msgid="8576443440738143764">"Idioma"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"Disseny"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"El teu estil d\'entrada personalitzat ha d\'estar activat perquè puguis començar a fer-lo servir. Vols activar-lo ara?"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"El teu estil d\'entrada personalitzat ha d\'estar activat per poder fer-lo servir. Vols activar-lo ara?"</string>
<string name="enable" msgid="5031294444630523247">"Activa"</string>
<string name="not_now" msgid="6172462888202790482">"Ara no"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"Ja existeix aquest estil d\'entrada: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
diff --git a/java/res/values-cs/strings.xml b/java/res/values-cs/strings.xml
index 03a72a9b9..13ea2cc55 100644
--- a/java/res/values-cs/strings.xml
+++ b/java/res/values-cs/strings.xml
@@ -37,9 +37,9 @@
<string name="misc_category" msgid="6894192814868233453">"Další možnosti"</string>
<string name="advanced_settings" msgid="362895144495591463">"Pokročilá nastavení"</string>
<string name="advanced_settings_summary" msgid="4487980456152830271">"Možnosti pro odborníky"</string>
- <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Přepnout na jiné metody zad."</string>
+ <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Přepínat metody zadávání"</string>
<string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Klávesa pro přepínání jazyka ovládá i další metody zadávání"</string>
- <string name="suppress_language_switch_key" msgid="8003788410354806368">"Zakázat kláv. přepínání jazyka"</string>
+ <string name="suppress_language_switch_key" msgid="8003788410354806368">"Zakázat kl. přepínání jazyka"</string>
<string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"Prodleva vysk. okna klávesnice"</string>
<string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"Bez prodlevy"</string>
<string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Výchozí"</string>
@@ -134,10 +134,10 @@
<string name="save" msgid="7646738597196767214">"Uložit"</string>
<string name="subtype_locale" msgid="8576443440738143764">"Jazyk"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"Rozvržení"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Vlastní styl zadávání musíte nejdříve povolit. Povolit?"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"Vlastní styl vstupu musíte nejdříve povolit. Povolit?"</string>
<string name="enable" msgid="5031294444630523247">"Povolit"</string>
<string name="not_now" msgid="6172462888202790482">"Teď ne"</string>
- <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Tento styl zadávání již existuje: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
+ <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Stejný styl vstupu již existuje: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
<string name="prefs_usability_study_mode" msgid="1261130555134595254">"Režim studie použitelnosti"</string>
<string name="prefs_keypress_vibration_duration_settings" msgid="1829950405285211668">"Délka vibrace při stisku klávesy"</string>
<string name="prefs_keypress_sound_volume_settings" msgid="5875933757082305040">"Hlasitost při stisknutí klávesy"</string>
diff --git a/java/res/values-el/strings.xml b/java/res/values-el/strings.xml
index 3946d4367..95d24419d 100644
--- a/java/res/values-el/strings.xml
+++ b/java/res/values-el/strings.xml
@@ -134,7 +134,7 @@
<string name="save" msgid="7646738597196767214">"Αποθήκευση"</string>
<string name="subtype_locale" msgid="8576443440738143764">"Γλώσσα"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"Διάταξη"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Απαιτείται ενεργοποίηση του προσαρμοσμένου στυλ εισόδου για χρήση. Ενεργοποίηση τώρα;"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"Απαιτείται ενεργοποίηση προσαρμ. στυλ εισόδου. Να γίνει τώρα;"</string>
<string name="enable" msgid="5031294444630523247">"Ενεργοποίηση"</string>
<string name="not_now" msgid="6172462888202790482">"Όχι τώρα"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"Το ίδιο στυλ εισόδου υπάρχει ήδη: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
diff --git a/java/res/values-en/whitelist.xml b/java/res/values-en/whitelist.xml
index 0a1646fed..9612aac5d 100644
--- a/java/res/values-en/whitelist.xml
+++ b/java/res/values-en/whitelist.xml
@@ -59,6 +59,10 @@
<item>not</item>
<item>255</item>
+ <item>bern</item>
+ <item>been</item>
+
+ <item>255</item>
<item>bur</item>
<item>but</item>
@@ -159,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>
@@ -182,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/res/values-es-rUS/strings.xml b/java/res/values-es-rUS/strings.xml
index dd2f247c6..bae0a6d61 100644
--- a/java/res/values-es-rUS/strings.xml
+++ b/java/res/values-es-rUS/strings.xml
@@ -134,7 +134,7 @@
<string name="save" msgid="7646738597196767214">"Guardar"</string>
<string name="subtype_locale" msgid="8576443440738143764">"Idioma"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"Diseño"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Debes activar tu estilo de entrada personalizado para poder utilizarlo. ¿Quieres activarlo ahora?"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"Debes activar estilo de entrada personalizado para utilizarlo."</string>
<string name="enable" msgid="5031294444630523247">"Activar"</string>
<string name="not_now" msgid="6172462888202790482">"Ahora no"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"Ya existe el estilo de entrada <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>."</string>
diff --git a/java/res/values-hi/strings.xml b/java/res/values-hi/strings.xml
index b0a3bd572..6287bce9c 100644
--- a/java/res/values-hi/strings.xml
+++ b/java/res/values-hi/strings.xml
@@ -134,7 +134,7 @@
<string name="save" msgid="7646738597196767214">"सहेजें"</string>
<string name="subtype_locale" msgid="8576443440738143764">"भाषा"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"लेआउट"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"अपनी कस्‍टम इनपुट शैली का उपयोग शुरू करने से पहले उसे सक्षम करना होगा. उसे अभी सक्षम करना चाहते हैं?"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"कस्‍टम इनपुट शैली का उपयोग करने से पहले सक्षम करना होगा. उसे सक्षम करना चाहते हैं?"</string>
<string name="enable" msgid="5031294444630523247">"सक्षम करें"</string>
<string name="not_now" msgid="6172462888202790482">"अभी नहीं"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"ऐसी ही इनपुट शैली पहले से मौजूद है: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
diff --git a/java/res/values-hu/strings.xml b/java/res/values-hu/strings.xml
index 91927132b..452da4210 100644
--- a/java/res/values-hu/strings.xml
+++ b/java/res/values-hu/strings.xml
@@ -134,7 +134,7 @@
<string name="save" msgid="7646738597196767214">"Mentés"</string>
<string name="subtype_locale" msgid="8576443440738143764">"Nyelv"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"Elrendezés"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Az egyéni stílust eng. kell haszn. előtt. Engedélyezi most?"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"Az egyéni stílust először engedélyezni kell. Engedélyezi most?"</string>
<string name="enable" msgid="5031294444630523247">"Engedélyezés"</string>
<string name="not_now" msgid="6172462888202790482">"Most nem"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"Ugyanez a bemenetstílus már létezik: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
diff --git a/java/res/values-land/keyboard-heights.xml b/java/res/values-land/keyboard-heights.xml
index 12c3e3951..4ebeda559 100644
--- a/java/res/values-land/keyboard-heights.xml
+++ b/java/res/values-land/keyboard-heights.xml
@@ -18,10 +18,10 @@
*/
-->
-<!-- Preferable keyboard height in absolute scale: 1.100in -->
<resources>
<!-- Build.HARDWARE,keyboard_height_in_dp -->
<string-array name="keyboard_heights" translatable="false">
+ <!-- Preferable keyboard height in absolute scale: 1.100in -->
<!-- Droid -->
<item>sholes,194.3333</item>
<!-- Nexus One -->
@@ -30,5 +30,8 @@
<item>herring,171.9385</item>
<!-- Galaxy Nexus -->
<item>tuna,173.4207</item>
+ <!-- Preferable keyboard height in absolute scale: 45.0mm -->
+ <!-- Xoom -->
+ <item>stingray,265.4378</item>
</string-array>
</resources>
diff --git a/java/res/values-sk/strings.xml b/java/res/values-sk/strings.xml
index acb942e15..f9aa372cd 100644
--- a/java/res/values-sk/strings.xml
+++ b/java/res/values-sk/strings.xml
@@ -134,7 +134,7 @@
<string name="save" msgid="7646738597196767214">"Uložiť"</string>
<string name="subtype_locale" msgid="8576443440738143764">"Jazyk"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"Rozloženie"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Pred použitím vlastného štýlu vstupu ho musíte povoliť. Chcete ho povoliť teraz?"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"Pred použitím vlastného štýlu vstupu ho musíte povoliť. Chcete ho povoliť?"</string>
<string name="enable" msgid="5031294444630523247">"Povoliť"</string>
<string name="not_now" msgid="6172462888202790482">"Teraz nie"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"Rovnaký štýl vstupu už existuje: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
diff --git a/java/res/values-sw600dp/keyboard-heights.xml b/java/res/values-sw600dp/keyboard-heights.xml
deleted file mode 100644
index 77e52be2f..000000000
--- a/java/res/values-sw600dp/keyboard-heights.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2012, 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.
-*/
--->
-
-<!-- Preferable keyboard height in absolute scale: 48.0mm -->
-<resources>
- <!-- Build.HARDWARE,keyboard_height_in_dp -->
- <string-array name="keyboard_heights" translatable="false">
- <!-- Xoom -->
- <item>stingray,283.1337</item>
- </string-array>
-</resources>
diff --git a/java/res/values-sw768dp-land/keyboard-heights.xml b/java/res/values-sw768dp-land/keyboard-heights.xml
deleted file mode 100644
index 692c5a0fb..000000000
--- a/java/res/values-sw768dp-land/keyboard-heights.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2012, 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.
-*/
--->
-
-<!-- Preferable keyboard height in absolute scale: 58.0mm -->
-<resources>
- <!-- Build.HARDWARE,keyboard_height_in_dp -->
- <string-array name="keyboard_heights" translatable="false">
- <!-- Xoom -->
- <item>stingray,342.1198</item>
- </string-array>
-</resources>
diff --git a/java/res/values-sw768dp/keyboard-heights.xml b/java/res/values-sw768dp/keyboard-heights.xml
deleted file mode 100644
index 77e52be2f..000000000
--- a/java/res/values-sw768dp/keyboard-heights.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2012, 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.
-*/
--->
-
-<!-- Preferable keyboard height in absolute scale: 48.0mm -->
-<resources>
- <!-- Build.HARDWARE,keyboard_height_in_dp -->
- <string-array name="keyboard_heights" translatable="false">
- <!-- Xoom -->
- <item>stingray,283.1337</item>
- </string-array>
-</resources>
diff --git a/java/res/values-th/strings.xml b/java/res/values-th/strings.xml
index 8b4d5ee93..d8980f21e 100644
--- a/java/res/values-th/strings.xml
+++ b/java/res/values-th/strings.xml
@@ -134,7 +134,7 @@
<string name="save" msgid="7646738597196767214">"บันทึก"</string>
<string name="subtype_locale" msgid="8576443440738143764">"ภาษา"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"การจัดวาง"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"ต้องเปิดใช้รูปแบบการป้อนที่กำหนดเองก่อนเริ่มใช้ เปิดใช้หรือไม่"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"ต้องเปิดใช้รูปแบบอินพุตที่กำหนดเองก่อน เปิดใช้เลยไหม"</string>
<string name="enable" msgid="5031294444630523247">"เปิดใช้งาน"</string>
<string name="not_now" msgid="6172462888202790482">"ข้ามไปก่อน"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"รูปแบบการป้อนข้อมูลเดียวกันนี้มีอยู่แล้ว: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
diff --git a/java/res/values-uk/strings.xml b/java/res/values-uk/strings.xml
index bfaa78bd6..2ab3e4ea5 100644
--- a/java/res/values-uk/strings.xml
+++ b/java/res/values-uk/strings.xml
@@ -137,7 +137,7 @@
<string name="custom_input_style_note_message" msgid="8826731320846363423">"Щоб використовувати користувацький стиль введення, його потрібно ввімкнути. Увімкнути його?"</string>
<string name="enable" msgid="5031294444630523247">"Увімкнути"</string>
<string name="not_now" msgid="6172462888202790482">"Не зараз"</string>
- <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Стиль введення з назвою <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g> уже існує"</string>
+ <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Таких стиль введення вже існує: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
<string name="prefs_usability_study_mode" msgid="1261130555134595254">"Режим вивчення зручності у використанні"</string>
<string name="prefs_keypress_vibration_duration_settings" msgid="1829950405285211668">"Налаштування тривалості вібрації під час натискання клавіші"</string>
<string name="prefs_keypress_sound_volume_settings" msgid="5875933757082305040">"Налаштування гучності звуку під час натискання клавіші"</string>
diff --git a/java/res/values-zh-rCN/strings.xml b/java/res/values-zh-rCN/strings.xml
index a6bb0c901..06728cc05 100644
--- a/java/res/values-zh-rCN/strings.xml
+++ b/java/res/values-zh-rCN/strings.xml
@@ -112,7 +112,7 @@
<string name="language_selection_title" msgid="1651299598555326750">"输入语言"</string>
<string name="select_language" msgid="3693815588777926848">"输入语言"</string>
<string name="hint_add_to_dictionary" msgid="573678656946085380">"再次触摸即可保存"</string>
- <string name="has_dictionary" msgid="6071847973466625007">"提供字典"</string>
+ <string name="has_dictionary" msgid="6071847973466625007">"有可用词典"</string>
<string name="prefs_enable_log" msgid="6620424505072963557">"启用用户反馈"</string>
<string name="prefs_description_log" msgid="5827825607258246003">"自动向 Google 发送使用情况统计信息和崩溃报告,帮助改进该输入法编辑器。"</string>
<string name="keyboard_layout" msgid="8451164783510487501">"键盘主题"</string>
diff --git a/java/res/values/keyboard-heights.xml b/java/res/values/keyboard-heights.xml
index 7d5b58372..7d85994be 100644
--- a/java/res/values/keyboard-heights.xml
+++ b/java/res/values/keyboard-heights.xml
@@ -18,10 +18,10 @@
*/
-->
-<!-- Preferable keyboard height in absolute scale: 1.285in -->
<resources>
<!-- Build.HARDWARE,keyboard_height_in_dp -->
<string-array name="keyboard_heights" translatable="false">
+ <!-- Preferable keyboard height in absolute scale: 1.285in -->
<!-- Droid -->
<item>sholes,227.0167</item>
<!-- Nexus One -->
@@ -30,5 +30,8 @@
<item>herring,200.8554</item>
<!-- Galaxy Nexus -->
<item>tuna,202.5869</item>
+ <!-- Preferable keyboard height in absolute scale: 48.0mm -->
+ <!-- Xoom -->
+ <item>stingray,283.1337</item>
</string-array>
</resources>
diff --git a/java/res/values-sw600dp-land/keyboard-heights.xml b/java/res/values/phantom_sudden_move_event_device_list.xml
index 93f9824d1..63d12e96e 100644
--- a/java/res/values-sw600dp-land/keyboard-heights.xml
+++ b/java/res/values/phantom_sudden_move_event_device_list.xml
@@ -17,12 +17,10 @@
** limitations under the License.
*/
-->
-
-<!-- Preferable keyboard height in absolute scale: 45.0mm -->
<resources>
- <!-- Build.HARDWARE,keyboard_height_in_dp -->
- <string-array name="keyboard_heights" translatable="false">
- <!-- Xoom -->
- <item>stingray,265.4378</item>
+ <string-array name="phantom_sudden_move_event_device_list" translatable="false">
+ <!-- "Build.HARDWARE,true" that needs "phantom sudden move event" hack.
+ See {@link com.android.inputmethod.keyboard.PointerTracker}. -->
+ <item>stingray,true</item> <!-- Xoom -->
</string-array>
</resources>
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index b1599937b..e917a8128 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -338,8 +338,10 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
mHasDistinctMultitouch = context.getPackageManager()
.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT);
-
- PointerTracker.init(mHasDistinctMultitouch);
+ final boolean needsPhantomSuddenMoveEventHack = Boolean.parseBoolean(
+ Utils.getDeviceOverrideValue(context.getResources(),
+ R.array.phantom_sudden_move_event_device_list, "false"));
+ PointerTracker.init(mHasDistinctMultitouch, needsPhantomSuddenMoveEventHack);
final TypedArray a = context.obtainStyledAttributes(
attrs, R.styleable.LatinKeyboardView, defStyle, R.style.LatinKeyboardView);
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index 59f53fc21..0f8f6cd91 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -108,6 +108,7 @@ public class PointerTracker {
// Parameters for pointer handling.
private static LatinKeyboardView.PointerTrackerParams sParams;
private static int sTouchNoiseThresholdDistanceSquared;
+ private static boolean sNeedsPhantomSuddenMoveEventHack;
private static final ArrayList<PointerTracker> sTrackers = new ArrayList<PointerTracker>();
private static PointerTrackerQueue sPointerTrackerQueue;
@@ -162,12 +163,14 @@ public class PointerTracker {
private static final KeyboardActionListener EMPTY_LISTENER =
new KeyboardActionListener.Adapter();
- public static void init(boolean hasDistinctMultitouch) {
+ public static void init(boolean hasDistinctMultitouch,
+ boolean needsPhantomSuddenMoveEventHack) {
if (hasDistinctMultitouch) {
sPointerTrackerQueue = new PointerTrackerQueue();
} else {
sPointerTrackerQueue = null;
}
+ sNeedsPhantomSuddenMoveEventHack = needsPhantomSuddenMoveEventHack;
setParameters(LatinKeyboardView.PointerTrackerParams.DEFAULT);
}
@@ -593,10 +596,13 @@ public class PointerTracker {
final int dx = x - lastX;
final int dy = y - lastY;
final int lastMoveSquared = dx * dx + dy * dy;
- if (lastMoveSquared >= mKeyQuarterWidthSquared) {
- if (DEBUG_MODE)
- Log.w(TAG, String.format("onMoveEvent: sudden move is translated to "
+ if (sNeedsPhantomSuddenMoveEventHack
+ && lastMoveSquared >= mKeyQuarterWidthSquared) {
+ if (DEBUG_MODE) {
+ Log.w(TAG, String.format("onMoveEvent:"
+ + " phantom sudden move event is translated to "
+ "up[%d,%d]/down[%d,%d] events", lastX, lastY, x, y));
+ }
if (ProductionFlag.IS_EXPERIMENTAL) {
ResearchLogger.pointerTracker_onMoveEvent(x, y, lastX, lastY);
}
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);
}
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java
index 08f3e8456..c9ff0a5a8 100644
--- a/java/src/com/android/inputmethod/latin/Settings.java
+++ b/java/src/com/android/inputmethod/latin/Settings.java
@@ -151,6 +151,11 @@ public class Settings extends InputMethodSettingsFragment
if (!VibratorUtils.getInstance(context).hasVibrator()) {
generalSettings.removePreference(findPreference(PREF_VIBRATE_ON));
+ final PreferenceGroup advancedSettings =
+ (PreferenceGroup) findPreference(PREF_ADVANCED_SETTINGS);
+ if (null != advancedSettings) { // Theoretically advancedSettings cannot be null
+ advancedSettings.removePreference(findPreference(PREF_VIBRATION_DURATION_SETTINGS));
+ }
}
final boolean showPopupOption = res.getBoolean(
diff --git a/java/src/com/android/inputmethod/latin/TargetApplicationGetter.java b/java/src/com/android/inputmethod/latin/TargetApplicationGetter.java
index 4fb2e9704..4265309e5 100644
--- a/java/src/com/android/inputmethod/latin/TargetApplicationGetter.java
+++ b/java/src/com/android/inputmethod/latin/TargetApplicationGetter.java
@@ -29,6 +29,7 @@ public class TargetApplicationGetter extends AsyncTask<String, Void, Application
new LruCache<String, ApplicationInfo>(MAX_CACHE_ENTRIES);
public static ApplicationInfo getCachedApplicationInfo(final String packageName) {
+ if (null == packageName) return null;
return sCache.get(packageName);
}
public static void removeApplicationInfoCache(final String packageName) {