aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/AndroidManifest.xml2
-rw-r--r--java/res/values-xlarge/config.xml32
-rw-r--r--java/res/values-xlarge/dimens.xml50
-rw-r--r--java/res/values-xlarge/donottranslate.xml23
-rw-r--r--java/res/values/strings.xml2
-rw-r--r--java/res/xml/method.xml177
-rw-r--r--java/res/xml/prefs.xml9
-rw-r--r--java/src/com/android/inputmethod/latin/BinaryDictionary.java4
-rw-r--r--java/src/com/android/inputmethod/voice/VoiceInputLogger.java6
9 files changed, 18 insertions, 287 deletions
diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml
index de4ac610c..da91d6451 100644
--- a/java/AndroidManifest.xml
+++ b/java/AndroidManifest.xml
@@ -1,6 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.inputmethod.latin">
+ <original-package android:name="com.android.inputmethod.latin" />
+
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
diff --git a/java/res/values-xlarge/config.xml b/java/res/values-xlarge/config.xml
deleted file mode 100644
index 4ceca45f1..000000000
--- a/java/res/values-xlarge/config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2010, 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.
-*/
--->
-
-<resources>
- <bool name="config_enable_show_settings_key_option">false</bool>
- <bool name="config_enable_show_subtype_settings">false</bool>
- <bool name="config_enable_show_voice_key_option">false</bool>
- <bool name="config_candidate_highlight_font_color_enabled">false</bool>
- <bool name="config_swipe_down_dismiss_keyboard_enabled">false</bool>
- <bool name="config_sliding_key_input_enabled">false</bool>
- <!-- Whether or not Popup on key press is enabled by default -->
- <bool name="config_default_popup_preview">false</bool>
- <string name="config_text_size_of_language_on_spacebar">medium</string>
- <integer name="config_max_popup_keyboard_column">9</integer>
-</resources>
diff --git a/java/res/values-xlarge/dimens.xml b/java/res/values-xlarge/dimens.xml
deleted file mode 100644
index 2c188bc0c..000000000
--- a/java/res/values-xlarge/dimens.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2010, 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.
-*/
--->
-
-<resources>
- <!-- keyboardHeight = key_height*4 + key_bottom_gap*3 -->
- <dimen name="keyboardHeight">48.0mm</dimen>
- <!-- key_height + key_bottom_gap = popup_key_height -->
- <!-- <dimen name="key_height">14.5mm</dimen> -->
- <dimen name="key_bottom_gap">0.0mm</dimen>
- <dimen name="key_horizontal_gap">0.0mm</dimen>
- <dimen name="popup_key_height">10.0mm</dimen>
- <dimen name="keyboard_top_padding">1.1mm</dimen>
- <dimen name="keyboard_bottom_padding">0.0mm</dimen>
- <!-- key_height x 1.0 -->
- <dimen name="key_preview_height">13.0mm</dimen>
- <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
- <!-- popup_key_height x 1.2 -->
- <dimen name="mini_keyboard_slide_allowance">15.6mm</dimen>
- <!-- popup_key_height x -1.0 -->
- <dimen name="mini_keyboard_vertical_correction">-13.0mm</dimen>
-
- <dimen name="key_letter_size">26dip</dimen>
- <dimen name="key_label_text_size">16dip</dimen>
- <dimen name="key_preview_text_size_large">24dip</dimen>
- <!-- left or right padding of label alignment -->
- <dimen name="key_label_horizontal_alignment_padding">6dip</dimen>
-
- <dimen name="candidate_strip_height">46dip</dimen>
- <dimen name="candidate_strip_padding">15.0mm</dimen>
- <dimen name="candidate_min_width">0.3in</dimen>
- <dimen name="candidate_padding">12dip</dimen>
- <dimen name="candidate_text_size">22dip</dimen>
-</resources>
diff --git a/java/res/values-xlarge/donottranslate.xml b/java/res/values-xlarge/donottranslate.xml
deleted file mode 100644
index 6f4e9b1f0..000000000
--- a/java/res/values-xlarge/donottranslate.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2010, 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.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Default value of the visibility of the suggestion strip -->
- <string name="prefs_suggestion_visibility_default_value" translatable="false">1</string>
-</resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 258f7cec5..d48e06626 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -31,7 +31,7 @@
<!-- Option to play back sound on keypress in soft keyboard -->
<string name="sound_on_keypress">Sound on keypress</string>
- <!-- Option to control whether or not to show a popup with a larger font on each key press. -->
+ <!-- Option to pop up the character with a larger font above soft keyboard -->
<string name="popup_on_keypress">Popup on keypress</string>
<!-- Category title for text prediction -->
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 482b35f4c..e5654e96d 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -20,178 +20,7 @@
<!-- The attributes in this XML file provide configuration information -->
<!-- for the Input Method Manager. -->
-<!-- Keyboard: en_US, cs, da, de, en_GB, es, es_US, fr, fr_CA, fr_CH, it, nb, nl, sr, sv -->
-<!-- Voice: cs, da, de, en_AU, en_GB, en_IN, en_NZ, en_US, es, fr, ko, ja, pl, pt, ru, tr, zh_CN, zh_TW -->
-<!-- TODO: use <lang>_keyboard icon instead of a common keyboard icon. -->
-<!-- TODO: use <lang>_mic icon instead of a common mic icon. -->
<input-method xmlns:android="http://schemas.android.com/apk/res/android"
- android:settingsActivity="com.android.inputmethod.latin.Settings"
- android:isDefault="@bool/im_is_default">
- <!-- If IME doesn't have an applicable subtype, the first subtype will be used as a default
- subtype.-->
- <subtype android:icon="@drawable/ic_subtype_keyboard_en_gb"
- android:label="@string/subtype_mode_en_US_keyboard"
- android:imeSubtypeLocale="en_US"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_cs"
- android:label="@string/subtype_mode_cs_keyboard"
- android:imeSubtypeLocale="cs"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_da"
- android:label="@string/subtype_mode_da_keyboard"
- android:imeSubtypeLocale="da"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_de"
- android:label="@string/subtype_mode_de_keyboard"
- android:imeSubtypeLocale="de"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_en_gb"
- android:label="@string/subtype_mode_en_GB_keyboard"
- android:imeSubtypeLocale="en_GB"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_es"
- android:label="@string/subtype_mode_es_keyboard"
- android:imeSubtypeLocale="es"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_es_us"
- android:label="@string/subtype_mode_es_US_keyboard"
- android:imeSubtypeLocale="es_US"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_fr"
- android:label="@string/subtype_mode_fr_keyboard"
- android:imeSubtypeLocale="fr"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_fr_ca"
- android:label="@string/subtype_mode_fr_CA_keyboard"
- android:imeSubtypeLocale="fr_CA"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_fr_ch"
- android:label="@string/subtype_mode_fr_CH_keyboard"
- android:imeSubtypeLocale="fr_CH"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_it"
- android:label="@string/subtype_mode_it_keyboard"
- android:imeSubtypeLocale="it"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_nb"
- android:label="@string/subtype_mode_nb_keyboard"
- android:imeSubtypeLocale="nb"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_nl"
- android:label="@string/subtype_mode_nl_keyboard"
- android:imeSubtypeLocale="nl"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_ru"
- android:label="@string/subtype_mode_ru_keyboard"
- android:imeSubtypeLocale="ru"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_sr"
- android:label="@string/subtype_mode_sr_keyboard"
- android:imeSubtypeLocale="sr"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_keyboard_sv"
- android:label="@string/subtype_mode_sv_keyboard"
- android:imeSubtypeLocale="sv"
- android:imeSubtypeMode="keyboard"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_cs"
- android:label="@string/subtype_mode_cs_voice"
- android:imeSubtypeLocale="cs"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_de"
- android:label="@string/subtype_mode_de_voice"
- android:imeSubtypeLocale="de"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_en_au"
- android:label="@string/subtype_mode_en_AU_voice"
- android:imeSubtypeLocale="en_AU"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_en_gb"
- android:label="@string/subtype_mode_en_GB_voice"
- android:imeSubtypeLocale="en_GB"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_en_in"
- android:label="@string/subtype_mode_en_IN_voice"
- android:imeSubtypeLocale="en_IN"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_en_nz"
- android:label="@string/subtype_mode_en_NZ_voice"
- android:imeSubtypeLocale="en_NZ"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_en_us"
- android:label="@string/subtype_mode_en_US_voice"
- android:imeSubtypeLocale="en_US"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_es"
- android:label="@string/subtype_mode_es_voice"
- android:imeSubtypeLocale="es"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_fr"
- android:label="@string/subtype_mode_fr_voice"
- android:imeSubtypeLocale="fr"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_ko"
- android:label="@string/subtype_mode_ko_voice"
- android:imeSubtypeLocale="ko"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_ja"
- android:label="@string/subtype_mode_ja_voice"
- android:imeSubtypeLocale="ja"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_pl"
- android:label="@string/subtype_mode_pl_voice"
- android:imeSubtypeLocale="pl"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_pt"
- android:label="@string/subtype_mode_pt_voice"
- android:imeSubtypeLocale="pt"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_ru"
- android:label="@string/subtype_mode_ru_voice"
- android:imeSubtypeLocale="ru"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_tr"
- android:label="@string/subtype_mode_tr_voice"
- android:imeSubtypeLocale="tr"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_zh_cn"
- android:label="@string/subtype_mode_zh_CN_voice"
- android:imeSubtypeLocale="zh_CN"
- android:imeSubtypeMode="voice"
- />
- <subtype android:icon="@drawable/ic_subtype_mic_zh_tw"
- android:label="@string/subtype_mode_zh_TW_voice"
- android:imeSubtypeLocale="zh_TW"
- android:imeSubtypeMode="voice"
- />
-</input-method>
+ android:settingsActivity="com.android.inputmethod.latin.LatinIMESettings"
+ android:isDefault="@bool/im_is_default"
+/>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 3b20298d2..bff2abb41 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -70,8 +70,6 @@
android:defaultValue="@string/voice_mode_main"
/>
- <!-- TODO: Filter subtypes by IME in SubtypeEnabler -->
- <!-- TODO: Maybe use this only for phone? -->
<PreferenceScreen
android:key="subtype_settings"
android:title="@string/language_selection_title"
@@ -128,4 +126,11 @@
android:defaultValue="false"
/>
+ <CheckBoxPreference
+ android:key="debug_mode"
+ android:title="Debug Mode"
+ android:persistent="true"
+ android:defaultValue="false"
+ />
+
</PreferenceScreen>
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 961b49f02..7ee0d77e5 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -60,9 +60,9 @@ public class BinaryDictionary extends Dictionary {
static {
try {
- System.loadLibrary("jni_latinime");
+ System.loadLibrary("jni_latinime2");
} catch (UnsatisfiedLinkError ule) {
- Log.e("BinaryDictionary", "Could not load native library jni_latinime");
+ Log.e("BinaryDictionary", "Could not load native library jni_latinime2");
}
}
diff --git a/java/src/com/android/inputmethod/voice/VoiceInputLogger.java b/java/src/com/android/inputmethod/voice/VoiceInputLogger.java
index 3e65434a2..107ec78e4 100644
--- a/java/src/com/android/inputmethod/voice/VoiceInputLogger.java
+++ b/java/src/com/android/inputmethod/voice/VoiceInputLogger.java
@@ -212,13 +212,13 @@ public class VoiceInputLogger {
setHasLoggingInfo(true);
Intent i = newLoggingBroadcast(LoggingEvents.VoiceIme.TEXT_MODIFIED);
i.putExtra(LoggingEvents.VoiceIme.EXTRA_TEXT_MODIFIED_LENGTH, suggestionLength);
- i.putExtra(LoggingEvents.VoiceIme.EXTRA_TEXT_REPLACED_LENGTH, replacedPhraseLength);
+ i.putExtra("rlength", replacedPhraseLength);
i.putExtra(LoggingEvents.VoiceIme.EXTRA_TEXT_MODIFIED_TYPE,
LoggingEvents.VoiceIme.TEXT_MODIFIED_TYPE_CHOOSE_SUGGESTION);
i.putExtra(LoggingEvents.VoiceIme.EXTRA_N_BEST_CHOOSE_INDEX, index);
- i.putExtra(LoggingEvents.VoiceIme.EXTRA_BEFORE_N_BEST_CHOOSE, before);
- i.putExtra(LoggingEvents.VoiceIme.EXTRA_AFTER_N_BEST_CHOOSE, after);
+ i.putExtra("before", before);
+ i.putExtra("after", after);
mContext.sendBroadcast(i);
}