diff options
Diffstat (limited to 'java')
19 files changed, 74 insertions, 119 deletions
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..7ffd368f4 100644 --- a/java/res/values-cs/strings.xml +++ b/java/res/values-cs/strings.xml @@ -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-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-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-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/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java index 0a09c845e..34308dfb3 100644 --- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java @@ -214,6 +214,10 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { return false; } if (contactCount != sContactCountAtLastRebuild) { + if (DEBUG) { + Log.d(TAG, "Contact count changed: " + sContactCountAtLastRebuild + " to " + + contactCount); + } return true; } // Check all contacts since it's not possible to find out which names have changed. diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index 08f585485..c65404cbc 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -294,7 +294,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { */ protected void loadBinaryDictionary() { if (DEBUG) { - Log.d(TAG, "Loading binary dictionary: request=" + Log.d(TAG, "Loading binary dictionary: " + mFilename + " request=" + mSharedDictionaryController.mLastUpdateRequestTime + " update=" + mSharedDictionaryController.mLastUpdateTime); } @@ -326,7 +326,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { */ private void generateBinaryDictionary() { if (DEBUG) { - Log.d(TAG, "Generating binary dictionary: request=" + Log.d(TAG, "Generating binary dictionary: " + mFilename + " request=" + mSharedDictionaryController.mLastUpdateRequestTime + " update=" + mSharedDictionaryController.mLastUpdateTime); } @@ -371,7 +371,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { mLocalDictionaryController.mLastUpdateRequestTime = time; mSharedDictionaryController.mLastUpdateRequestTime = time; if (DEBUG) { - Log.d(TAG, "Reload request: request=" + time + " update=" + Log.d(TAG, "Reload request: " + mFilename + ": request=" + time + " update=" + mSharedDictionaryController.mLastUpdateTime); } } @@ -380,28 +380,46 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { * Reloads the dictionary if required. Reload will occur asynchronously in a separate thread. */ void asyncReloadDictionaryIfRequired() { + if (!isReloadRequired()) return; + if (DEBUG) { + Log.d(TAG, "Starting AsyncReloadDictionaryTask: " + mFilename); + } new AsyncReloadDictionaryTask().start(); } /** - * Reloads the dictionary if required. Access is controlled on a per dictionary file basis and - * supports concurrent calls from multiple instances that share the same dictionary file. + * Reloads the dictionary if required. */ protected final void syncReloadDictionaryIfRequired() { - if (mBinaryDictionary != null && !mLocalDictionaryController.isOutOfDate()) { - return; - } + if (!isReloadRequired()) return; + syncReloadDictionaryInternal(); + } + + /** + * Returns whether a dictionary reload is required. + */ + private boolean isReloadRequired() { + return mBinaryDictionary == null || mLocalDictionaryController.isOutOfDate(); + } + /** + * Reloads the dictionary. Access is controlled on a per dictionary file basis and supports + * concurrent calls from multiple instances that share the same dictionary file. + */ + private final void syncReloadDictionaryInternal() { // Ensure that only one thread attempts to read or write to the shared binary dictionary // file at the same time. mSharedDictionaryController.lock(); try { final long time = SystemClock.uptimeMillis(); - if (mSharedDictionaryController.isOutOfDate() || !dictionaryFileExists()) { + final boolean dictionaryFileExists = dictionaryFileExists(); + if (mSharedDictionaryController.isOutOfDate() || !dictionaryFileExists) { // If the shared dictionary file does not exist or is out of date, the first // instance that acquires the lock will generate a new one. - if (hasContentChanged()) { - // If the source content has changed, rebuild the binary dictionary. + if (hasContentChanged() || !dictionaryFileExists) { + // If the source content has changed or the dictionary does not exist, rebuild + // the binary dictionary. Empty dictionaries are supported (in the case where + // loadDictionaryAsync() adds nothing) in order to provide a uniform framework. mSharedDictionaryController.mLastUpdateTime = time; generateBinaryDictionary(); loadBinaryDictionary(); @@ -435,7 +453,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { private class AsyncReloadDictionaryTask extends Thread { @Override public void run() { - syncReloadDictionaryIfRequired(); + syncReloadDictionaryInternal(); } } 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( |