aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/proguard.flags4
-rw-r--r--java/res/drawable-hdpi/sym_keyboard_zwj_holo.pngbin0 -> 973 bytes
-rw-r--r--java/res/drawable-hdpi/sym_keyboard_zwnj_holo.pngbin0 -> 961 bytes
-rw-r--r--java/res/drawable-mdpi/sym_keyboard_zwj_holo.pngbin0 -> 733 bytes
-rw-r--r--java/res/drawable-mdpi/sym_keyboard_zwnj_holo.pngbin0 -> 704 bytes
-rw-r--r--java/res/drawable-xhdpi/sym_keyboard_zwj_holo.pngbin0 -> 1185 bytes
-rw-r--r--java/res/drawable-xhdpi/sym_keyboard_zwnj_holo.pngbin0 -> 1148 bytes
-rw-r--r--java/res/values-en/donottranslate-more-keys.xml50
-rw-r--r--java/res/values-fa/donottranslate-more-keys.xml50
-rw-r--r--java/res/values-is/donottranslate-more-keys.xml73
-rw-r--r--java/res/values-land/dimens.xml13
-rw-r--r--java/res/values-sl/strings.xml2
-rw-r--r--java/res/values-sw600dp-land/dimens.xml4
-rw-r--r--java/res/values-sw600dp/dimens.xml18
-rw-r--r--java/res/values-sw768dp-land/dimens.xml8
-rw-r--r--java/res/values-sw768dp/dimens.xml16
-rw-r--r--java/res/values/attrs.xml4
-rw-r--r--java/res/values/config.xml4
-rw-r--r--java/res/values/dimens.xml20
-rw-r--r--java/res/values/donottranslate-more-keys.xml5
-rw-r--r--java/res/values/keyboard-icons-black.xml3
-rw-r--r--java/res/values/keyboard-icons-ics.xml2
-rw-r--r--java/res/values/keyboard-icons-white.xml3
-rw-r--r--java/res/xml-fa/keyboard_set.xml2
-rw-r--r--java/res/xml-is/keyboard_set.xml42
-rw-r--r--java/res/xml-sw600dp/key_styles_common.xml10
-rw-r--r--java/res/xml-sw600dp/keys_comma_period.xml (renamed from java/res/xml/keys_comma_period.xml)10
-rw-r--r--java/res/xml-sw600dp/rowkeys_farsi1.xml66
-rw-r--r--java/res/xml-sw600dp/rowkeys_farsi2.xml70
-rw-r--r--java/res/xml-sw600dp/rowkeys_farsi3.xml53
-rw-r--r--java/res/xml-sw600dp/rowkeys_thai3.xml6
-rw-r--r--java/res/xml-sw600dp/rows_farsi.xml62
-rw-r--r--java/res/xml-sw768dp/key_styles_common.xml10
-rw-r--r--java/res/xml-sw768dp/row_qwerty4.xml6
-rw-r--r--java/res/xml-sw768dp/rows_farsi.xml69
-rw-r--r--java/res/xml/kbd_farsi.xml26
-rw-r--r--java/res/xml/key_styles_common.xml10
-rw-r--r--java/res/xml/key_styles_currency.xml46
-rw-r--r--java/res/xml/key_styles_currency_dollar.xml12
-rw-r--r--java/res/xml/key_styles_currency_euro.xml14
-rw-r--r--java/res/xml/method.xml7
-rw-r--r--java/res/xml/rowkeys_farsi1.xml90
-rw-r--r--java/res/xml/rowkeys_farsi2.xml71
-rw-r--r--java/res/xml/rowkeys_farsi3.xml55
-rw-r--r--java/res/xml/rowkeys_thai2.xml6
-rw-r--r--java/res/xml/rows_farsi.xml51
-rw-r--r--java/src/com/android/inputmethod/keyboard/Keyboard.java2
-rw-r--r--java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java35
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java4
-rw-r--r--java/src/com/android/inputmethod/latin/BinaryDictionary.java10
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableDictionary.java8
-rw-r--r--java/src/com/android/inputmethod/latin/LastComposedWord.java8
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java11
-rw-r--r--java/src/com/android/inputmethod/latin/LatinImeLogger.java4
-rw-r--r--java/src/com/android/inputmethod/latin/ResearchLogger.java14
-rw-r--r--java/src/com/android/inputmethod/latin/Settings.java6
-rw-r--r--java/src/com/android/inputmethod/latin/WordComposer.java52
-rw-r--r--java/src/com/android/inputmethod/latin/define/ProductionFlag.java21
-rw-r--r--java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java6
59 files changed, 1063 insertions, 191 deletions
diff --git a/java/proguard.flags b/java/proguard.flags
index 701786a84..e33706c47 100644
--- a/java/proguard.flags
+++ b/java/proguard.flags
@@ -47,6 +47,10 @@
<init>(...);
}
+-keep class com.android.inputmethod.latin.ResearchLogger {
+ void setLogFileManager(...);
+}
+
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
diff --git a/java/res/drawable-hdpi/sym_keyboard_zwj_holo.png b/java/res/drawable-hdpi/sym_keyboard_zwj_holo.png
new file mode 100644
index 000000000..5fa30ceb8
--- /dev/null
+++ b/java/res/drawable-hdpi/sym_keyboard_zwj_holo.png
Binary files differ
diff --git a/java/res/drawable-hdpi/sym_keyboard_zwnj_holo.png b/java/res/drawable-hdpi/sym_keyboard_zwnj_holo.png
new file mode 100644
index 000000000..91367f3d2
--- /dev/null
+++ b/java/res/drawable-hdpi/sym_keyboard_zwnj_holo.png
Binary files differ
diff --git a/java/res/drawable-mdpi/sym_keyboard_zwj_holo.png b/java/res/drawable-mdpi/sym_keyboard_zwj_holo.png
new file mode 100644
index 000000000..70370d83d
--- /dev/null
+++ b/java/res/drawable-mdpi/sym_keyboard_zwj_holo.png
Binary files differ
diff --git a/java/res/drawable-mdpi/sym_keyboard_zwnj_holo.png b/java/res/drawable-mdpi/sym_keyboard_zwnj_holo.png
new file mode 100644
index 000000000..a69eade17
--- /dev/null
+++ b/java/res/drawable-mdpi/sym_keyboard_zwnj_holo.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/sym_keyboard_zwj_holo.png b/java/res/drawable-xhdpi/sym_keyboard_zwj_holo.png
new file mode 100644
index 000000000..26694274e
--- /dev/null
+++ b/java/res/drawable-xhdpi/sym_keyboard_zwj_holo.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/sym_keyboard_zwnj_holo.png b/java/res/drawable-xhdpi/sym_keyboard_zwnj_holo.png
new file mode 100644
index 000000000..75a22b65f
--- /dev/null
+++ b/java/res/drawable-xhdpi/sym_keyboard_zwnj_holo.png
Binary files differ
diff --git a/java/res/values-en/donottranslate-more-keys.xml b/java/res/values-en/donottranslate-more-keys.xml
index 9073d3b4f..6e43e86d7 100644
--- a/java/res/values-en/donottranslate-more-keys.xml
+++ b/java/res/values-en/donottranslate-more-keys.xml
@@ -18,12 +18,46 @@
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="more_keys_for_a">à,á,â,ä,æ,ã,å,ā</string>
- <string name="more_keys_for_e">è,é,ê,ë,ē</string>
- <string name="more_keys_for_i">î,ï,í,ī,ì</string>
- <string name="more_keys_for_o">ô,ö,ò,ó,œ,ø,ō,õ</string>
- <string name="more_keys_for_s">ß</string>
- <string name="more_keys_for_u">û,ü,ù,ú,ū</string>
- <string name="more_keys_for_n">ñ</string>
- <string name="more_keys_for_c">ç</string>
+ <!-- U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+ U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
+ U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
+ U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+ U+00E6: "æ" LATIN SMALL LETTER AE
+ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
+ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
+ U+0101: "ā" LATIN SMALL LETTER A WITH MACRON -->
+ <string name="more_keys_for_a">&#x00E0;,&#x00E1;,&#x00E2;,&#x00E4;,&#x00E6;,&#x00E3;,&#x00E5;,&#x0101;</string>
+ <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
+ U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+ U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
+ U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
+ U+0113: "ē" LATIN SMALL LETTER E WITH MACRON -->
+ <string name="more_keys_for_e">&#x00E8;,&#x00E9;,&#x00EA;,&#x00EB;,&#x0103;</string>
+ <!-- U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
+ U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
+ U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
+ U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
+ U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE -->
+ <string name="more_keys_for_i">&#x00EE;,&#x00EF;,&#x00ED;,&#x012B;,&#x00EC;</string>
+ <!-- U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+ U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+ U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+ U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+ U+0153: "œ" LATIN SMALL LIGATURE OE
+ U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+ U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
+ U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE -->
+ <string name="more_keys_for_o">&#x00F4;,&#x00F6;,&#x00F2;,&#x00F3;,&#x0153;,&#x00F8;&#x014D;,&#x00F5;</string>
+ <!-- U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
+ U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+ U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
+ U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
+ U+016B: "ū" LATIN SMALL LETTER U WITH MACRON -->
+ <string name="more_keys_for_u">&#x00FB;,&#x00FC;,&#x00F9;,&#x00FA;,&#x016B;</string>
+ <!-- U+00DF: "ß" LATIN SMALL LETTER SHARP S -->
+ <string name="more_keys_for_s">&#x00DF;</string>
+ <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE -->
+ <string name="more_keys_for_n">&#x00F1;</string>
+ <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA -->
+ <string name="more_keys_for_c">&#x00E7;</string>
</resources>
diff --git a/java/res/values-fa/donottranslate-more-keys.xml b/java/res/values-fa/donottranslate-more-keys.xml
index 3e13c795a..1fb1846d9 100644
--- a/java/res/values-fa/donottranslate-more-keys.xml
+++ b/java/res/values-fa/donottranslate-more-keys.xml
@@ -38,26 +38,26 @@
<!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
<string name="more_keys_for_punctuation">"!fixedColumnOrder!8,\",\',-,:,!,&#x061F;,&#x060C;,&#x061B;,&#x0650;,&#x064E;,&#x064D;,&#x064B;,&#x0656;,&#x0670;,&#x0655;,&#x0654;,&#x064F;,&#x064C;,&#x0651;,&#x0652;,&#x0653;,&#x0640;&#x0640;&#x0640;|&#x0640;,/"</string>
<string name="keyhintlabel_for_punctuation">&#x064B;</string>
- <!-- U+0661: "١" ARABIC-INDIC DIGIT ONE -->
- <string name="keylabel_for_symbols_1">&#x0661;</string>
- <!-- U+0662: "٢" ARABIC-INDIC DIGIT TWO -->
- <string name="keylabel_for_symbols_2">&#x0662;</string>
- <!-- U+0663: "٣" ARABIC-INDIC DIGIT THREE -->
- <string name="keylabel_for_symbols_3">&#x0663;</string>
- <!-- U+0664: "٤" ARABIC-INDIC DIGIT FOUR -->
- <string name="keylabel_for_symbols_4">&#x0664;</string>
- <!-- U+0665: "٥" ARABIC-INDIC DIGIT FIVE -->
- <string name="keylabel_for_symbols_5">&#x0665;</string>
- <!-- U+0666: "٦" ARABIC-INDIC DIGIT SIX -->
- <string name="keylabel_for_symbols_6">&#x0666;</string>
- <!-- U+0667: "٧" ARABIC-INDIC DIGIT SEVEN -->
- <string name="keylabel_for_symbols_7">&#x0667;</string>
- <!-- U+0668: "٨" ARABIC-INDIC DIGIT EIGHT -->
- <string name="keylabel_for_symbols_8">&#x0668;</string>
- <!-- U+0669: "٩" ARABIC-INDIC DIGIT NINE -->
- <string name="keylabel_for_symbols_9">&#x0669;</string>
- <!-- U+0660: "٠" ARABIC-INDIC DIGIT ZERO -->
- <string name="keylabel_for_symbols_0">&#x0660;</string>
+ <!-- U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE -->
+ <string name="keylabel_for_symbols_1">&#x06F1;</string>
+ <!-- U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO -->
+ <string name="keylabel_for_symbols_2">&#x06F2;</string>
+ <!-- U+06F3: "۳" EXTENDED ARABIC-INDIC DIGIT THREE -->
+ <string name="keylabel_for_symbols_3">&#x06F3;</string>
+ <!-- U+06F4: "۴" EXTENDED ARABIC-INDIC DIGIT FOUR -->
+ <string name="keylabel_for_symbols_4">&#x06F4;</string>
+ <!-- U+06F5: "۵" EXTENDED ARABIC-INDIC DIGIT FIVE -->
+ <string name="keylabel_for_symbols_5">&#x06F5;</string>
+ <!-- U+06F6: "۶" EXTENDED ARABIC-INDIC DIGIT SIX -->
+ <string name="keylabel_for_symbols_6">&#x06F6;</string>
+ <!-- U+06F7: "۷" EXTENDED ARABIC-INDIC DIGIT SEVEN -->
+ <string name="keylabel_for_symbols_7">&#x06F7;</string>
+ <!-- U+06F8: "۸" EXTENDED ARABIC-INDIC DIGIT EIGHT -->
+ <string name="keylabel_for_symbols_8">&#x06F8;</string>
+ <!-- U+06F9: "۹" EXTENDED ARABIC-INDIC DIGIT NINE -->
+ <string name="keylabel_for_symbols_9">&#x06F9;</string>
+ <!-- U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO -->
+ <string name="keylabel_for_symbols_0">&#x06F0;</string>
<string name="additional_more_keys_for_symbols_1">1</string>
<string name="additional_more_keys_for_symbols_2">2</string>
<string name="additional_more_keys_for_symbols_3">3</string>
@@ -84,9 +84,11 @@
<!-- U+060C: "،" ARABIC COMMA
U+061B: "؛" ARABIC SEMICOLON
U+061F: "؟" ARABIC QUESTION MARK -->
- <string name="keylabel_for_apostrophe">&#x060C;</string>
- <string name="keylabel_for_dash">"."</string>
- <string name="keyhintlabel_for_apostrophe">&#x061F;</string>
+ <string name="keylabel_for_tablet_comma">"&#x060C;"</string>
+ <string name="keyhintlabel_for_tablet_comma">"!"</string>
+ <string name="more_keys_for_tablet_comma">"!,\\,"</string>
+ <string name="keyhintlabel_for_tablet_period">"&#x061F;"</string>
+ <string name="more_keys_for_tablet_period">"&#x061F;,\?"</string>
<string name="keyhintlabel_for_dash">&#x064B;</string>
<string name="more_keys_for_apostrophe">"&#x061F;,&#x061B;,!,:,-,/,\',\""</string>
<!-- U+0651: "ّ" ARABIC SHADDA
@@ -104,7 +106,7 @@
U+0654: "ٔ" ARABIC HAMZA ABOVE
U+0655: "ٕ" ARABIC HAMZA BELOW -->
<!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
- <string name="more_keys_for_dash">"&#x0651;,&#x0652;,&#x064C;,&#x0653;,&#x064F;,&#x0650;,&#x064E;,&#x064B;,&#x0640;&#x0640;&#x0640;|&#x0640;,&#x064D;,&#x0654;,&#x0656;,&#x0655;,&#x0670;"</string>
+ <string name="more_keys_for_dash">"&#x0651;,&#x0652;,&#x064C;,&#x0653;,&#x064F;,&#x0650;,&#x064E;,&#x064B;,&#x0640;&#x0640;&#x0640;|&#x0640;,&#x064D;,&#x0654;,&#x0656;,&#x0655;,_,&#x0670;"</string>
<!-- U+266A: "♪" EIGHTH NOTE -->
<string name="more_keys_for_bullet">&#x266A;</string>
<!-- U+2605: "★" BLACK STAR
diff --git a/java/res/values-is/donottranslate-more-keys.xml b/java/res/values-is/donottranslate-more-keys.xml
new file mode 100644
index 000000000..2c3fa1e2e
--- /dev/null
+++ b/java/res/values-is/donottranslate-more-keys.xml
@@ -0,0 +1,73 @@
+<?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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
+ U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+ U+00E6: "æ" LATIN SMALL LETTER AE
+ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
+ U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+ U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
+ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
+ U+0101: "ā" LATIN SMALL LETTER A WITH MACRON -->
+ <string name="more_keys_for_a">&#x00E1;,&#x00E4;,&#x00E6;,&#x00E5;,&#x00E0;,&#x00E2;,&#x00E3;,&#x0101;</string>
+ <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+ U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
+ U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
+ U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
+ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
+ U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
+ U+0113: "ē" LATIN SMALL LETTER E WITH MACRON -->
+ <string name="more_keys_for_e">&#x00E9;,&#x00EB;,&#x00E8;,&#x00EA;,&#x0119;,&#x0117;,&#x0113;</string>
+ <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
+ U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
+ U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
+ U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
+ U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
+ U+012B: "ī" LATIN SMALL LETTER I WITH MACRON -->
+ <string name="more_keys_for_i">&#x00ED;,&#x00EF;,&#x00EE;,&#x00EC;,&#x012F;,&#x012B;</string>
+ <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+ U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+ U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+ U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+ U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
+ U+0153: "œ" LATIN SMALL LIGATURE OE
+ U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+ U+014D: "ō" LATIN SMALL LETTER O WITH MACRON -->
+ <string name="more_keys_for_o">&#x00F3;,&#x00F6;,&#x00F4;,&#x00F2;,&#x00F5;,&#x0153;,&#x00F8;,&#x014D;</string>
+ <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
+ U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+ U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
+ U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
+ U+016B: "ū" LATIN SMALL LETTER U WITH MACRON -->
+ <string name="more_keys_for_u">&#x00FA;,&#x00FC;,&#x00FB;,&#x00F9;,&#x016B;</string>
+ <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
+ U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS -->
+ <string name="more_keys_for_y">&#x00FD;,&#x00FF;</string>
+ <!-- U+00F0: "ð" LATIN SMALL LETTER ETH -->
+ <string name="more_keys_for_d">&#x00F0;</string>
+ <!-- U+00FE: "þ" LATIN SMALL LETTER THORN -->
+ <string name="more_keys_for_t">&#x00FE;</string>
+ <!-- U+00F0: "ð" LATIN SMALL LETTER ETH -->
+ <string name="keylabel_for_scandinavia_row1_11">&#x00F0;</string>
+ <!-- U+00E6: "æ" LATIN SMALL LETTER AE -->
+ <string name="keylabel_for_scandinavia_row2_10">&#x00E6;</string>
+ <!-- U+00FE: "þ" LATIN SMALL LETTER THORN -->
+ <string name="keylabel_for_scandinavia_row2_11">&#x00FE;</string>
+</resources>
diff --git a/java/res/values-land/dimens.xml b/java/res/values-land/dimens.xml
index 550d29f76..1157b2733 100644
--- a/java/res/values-land/dimens.xml
+++ b/java/res/values-land/dimens.xml
@@ -24,8 +24,7 @@
<dimen name="keyboardHeight">176.0dp</dimen>
<fraction name="minKeyboardHeight">45%p</fraction>
<!-- key_height + key_bottom_gap = popup_key_height -->
-<!-- <dimen name="key_height">0.260in</dimen>-->
- <dimen name="popup_key_height">0.280in</dimen>
+ <dimen name="popup_key_height">44.8dp</dimen>
<fraction name="keyboard_top_padding">1.818%p</fraction>
<fraction name="keyboard_bottom_padding">0.0%p</fraction>
@@ -54,11 +53,11 @@
<fraction name="key_uppercase_letter_ratio">40%</fraction>
<fraction name="key_preview_text_ratio">90%</fraction>
<fraction name="spacebar_text_ratio">40.000%</fraction>
- <dimen name="key_preview_offset">0.08in</dimen>
+ <dimen name="key_preview_offset">12.8dp</dimen>
- <dimen name="key_preview_offset_ics">0.01in</dimen>
+ <dimen name="key_preview_offset_ics">1.6dp</dimen>
<!-- popup_key_height x -0.5 -->
- <dimen name="more_keys_keyboard_vertical_correction_ics">-0.140in</dimen>
+ <dimen name="more_keys_keyboard_vertical_correction_ics">-22.4dp</dimen>
<dimen name="suggestions_strip_height">36dp</dimen>
<dimen name="more_suggestions_row_height">36dp</dimen>
@@ -66,7 +65,7 @@
<fraction name="min_more_suggestions_width">60%</fraction>
<!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
<!-- popup_key_height x 1.2 -->
- <dimen name="more_keys_keyboard_slide_allowance">0.336in</dimen>
+ <dimen name="more_keys_keyboard_slide_allowance">53.76dp</dimen>
<!-- popup_key_height x -1.0 -->
- <dimen name="more_keys_keyboard_vertical_correction">-0.280in</dimen>
+ <dimen name="more_keys_keyboard_vertical_correction">-44.8dp</dimen>
</resources>
diff --git a/java/res/values-sl/strings.xml b/java/res/values-sl/strings.xml
index 984fd9cba..be33ff8a1 100644
--- a/java/res/values-sl/strings.xml
+++ b/java/res/values-sl/strings.xml
@@ -39,7 +39,7 @@
<string name="advanced_settings_summary" msgid="4487980456152830271">"Možnosti za strokovnjake"</string>
<string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Prekl. na drug nač. vnosa"</string>
<string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Tipka za preklop jezika, ki vključuje tudi druge načine vnosa"</string>
- <string name="suppress_language_switch_key" msgid="8003788410354806368">"Onemogoči preklop jezika"</string>
+ <string name="suppress_language_switch_key" msgid="8003788410354806368">"Onemogoči tipko za preklop jezika"</string>
<string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"Trajanje povečanja tipke"</string>
<string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"Brez zakasnitve"</string>
<string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Privzeto"</string>
diff --git a/java/res/values-sw600dp-land/dimens.xml b/java/res/values-sw600dp-land/dimens.xml
index c6c6f2b3b..8a59c9b54 100644
--- a/java/res/values-sw600dp-land/dimens.xml
+++ b/java/res/values-sw600dp-land/dimens.xml
@@ -38,7 +38,7 @@
<fraction name="key_bottom_gap_ics">4.0%p</fraction>
<fraction name="keyboard_bottom_padding_ics">0.0%p</fraction>
- <dimen name="popup_key_height">13.0mm</dimen>
+ <dimen name="popup_key_height">81.9dp</dimen>
<!-- left or right padding of label alignment -->
<dimen name="key_label_horizontal_padding">18dp</dimen>
@@ -51,7 +51,7 @@
<fraction name="key_uppercase_letter_ratio">29%</fraction>
<fraction name="spacebar_text_ratio">33.33%</fraction>
- <dimen name="suggestions_strip_padding">40.0mm</dimen>
+ <dimen name="suggestions_strip_padding">252.0dp</dimen>
<integer name="max_more_suggestions_row">5</integer>
<fraction name="min_more_suggestions_width">50%</fraction>
</resources>
diff --git a/java/res/values-sw600dp/dimens.xml b/java/res/values-sw600dp/dimens.xml
index ebe388263..f03ce2943 100644
--- a/java/res/values-sw600dp/dimens.xml
+++ b/java/res/values-sw600dp/dimens.xml
@@ -25,7 +25,7 @@
<fraction name="maxKeyboardHeight">50%p</fraction>
<fraction name="minKeyboardHeight">-35.0%p</fraction>
- <dimen name="popup_key_height">10.0mm</dimen>
+ <dimen name="popup_key_height">63.0dp</dimen>
<fraction name="keyboard_top_padding">2.291%p</fraction>
<fraction name="keyboard_bottom_padding">0.0%p</fraction>
@@ -44,9 +44,9 @@
<dimen name="more_keys_keyboard_key_horizontal_padding">6dp</dimen>
<!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
<!-- popup_key_height x 1.2 -->
- <dimen name="more_keys_keyboard_slide_allowance">15.6mm</dimen>
+ <dimen name="more_keys_keyboard_slide_allowance">98.3dp</dimen>
<!-- popup_key_height x -1.0 -->
- <dimen name="more_keys_keyboard_vertical_correction">-13.0mm</dimen>
+ <dimen name="more_keys_keyboard_vertical_correction">-81.9dp</dimen>
<!-- left or right padding of label alignment -->
<dimen name="key_label_horizontal_padding">6dp</dimen>
@@ -61,19 +61,19 @@
<fraction name="key_uppercase_letter_ratio">26%</fraction>
<fraction name="key_preview_text_ratio">50%</fraction>
<fraction name="spacebar_text_ratio">32.14%</fraction>
- <dimen name="key_preview_height">15.0mm</dimen>
- <dimen name="key_preview_offset">0.1in</dimen>
+ <dimen name="key_preview_height">94.5dp</dimen>
+ <dimen name="key_preview_offset">16.0dp</dimen>
- <dimen name="key_preview_offset_ics">0.05in</dimen>
+ <dimen name="key_preview_offset_ics">8.0dp</dimen>
<!-- popup_key_height x -0.5 -->
- <dimen name="more_keys_keyboard_vertical_correction_ics">-5mm</dimen>
+ <dimen name="more_keys_keyboard_vertical_correction_ics">-31.5dp</dimen>
<dimen name="suggestions_strip_height">44dp</dimen>
<dimen name="more_suggestions_row_height">44dp</dimen>
<integer name="max_more_suggestions_row">6</integer>
<fraction name="min_more_suggestions_width">90%</fraction>
- <dimen name="suggestions_strip_padding">15.0mm</dimen>
- <dimen name="suggestion_min_width">0.3in</dimen>
+ <dimen name="suggestions_strip_padding">94.5dp</dimen>
+ <dimen name="suggestion_min_width">48.0dp</dimen>
<dimen name="suggestion_padding">12dp</dimen>
<dimen name="suggestion_text_size">22dp</dimen>
<dimen name="more_suggestions_hint_text_size">33dp</dimen>
diff --git a/java/res/values-sw768dp-land/dimens.xml b/java/res/values-sw768dp-land/dimens.xml
index 597ed5102..b95c858dc 100644
--- a/java/res/values-sw768dp-land/dimens.xml
+++ b/java/res/values-sw768dp-land/dimens.xml
@@ -41,7 +41,7 @@
<fraction name="key_bottom_gap_ics">3.690%p</fraction>
<fraction name="key_horizontal_gap_ics">1.030%p</fraction>
- <dimen name="popup_key_height">13.0mm</dimen>
+ <dimen name="popup_key_height">81.9dp</dimen>
<!-- left or right padding of label alignment -->
<dimen name="key_label_horizontal_padding">18dp</dimen>
@@ -53,10 +53,10 @@
<fraction name="key_hint_label_ratio">28%</fraction>
<fraction name="key_uppercase_letter_ratio">24%</fraction>
<fraction name="spacebar_text_ratio">24.00%</fraction>
- <dimen name="key_preview_height">17.0mm</dimen>
+ <dimen name="key_preview_height">107.1dp</dimen>
- <dimen name="key_preview_offset_ics">0.05in</dimen>
+ <dimen name="key_preview_offset_ics">8.0dp</dimen>
- <dimen name="suggestions_strip_padding">40.0mm</dimen>
+ <dimen name="suggestions_strip_padding">252.0dp</dimen>
<fraction name="min_more_suggestions_width">50%</fraction>
</resources>
diff --git a/java/res/values-sw768dp/dimens.xml b/java/res/values-sw768dp/dimens.xml
index a9f0c00aa..0a362fd68 100644
--- a/java/res/values-sw768dp/dimens.xml
+++ b/java/res/values-sw768dp/dimens.xml
@@ -41,14 +41,14 @@
<fraction name="key_bottom_gap_ics">3.312%p</fraction>
<fraction name="key_horizontal_gap_ics">1.066%p</fraction>
- <dimen name="popup_key_height">10.0mm</dimen>
+ <dimen name="popup_key_height">63.0dp</dimen>
<dimen name="more_keys_keyboard_key_horizontal_padding">12dp</dimen>
<!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
<!-- popup_key_height x 1.2 -->
- <dimen name="more_keys_keyboard_slide_allowance">15.6mm</dimen>
+ <dimen name="more_keys_keyboard_slide_allowance">98.3dp</dimen>
<!-- popup_key_height x -1.0 -->
- <dimen name="more_keys_keyboard_vertical_correction">-13.0mm</dimen>
+ <dimen name="more_keys_keyboard_vertical_correction">-81.9dp</dimen>
<!-- left or right padding of label alignment -->
<dimen name="key_label_horizontal_padding">6dp</dimen>
@@ -63,18 +63,18 @@
<fraction name="key_uppercase_letter_ratio">26%</fraction>
<fraction name="key_preview_text_ratio">50%</fraction>
<fraction name="spacebar_text_ratio">29.03%</fraction>
- <dimen name="key_preview_height">15.0mm</dimen>
- <dimen name="key_preview_offset">0.1in</dimen>
+ <dimen name="key_preview_height">94.5dp</dimen>
+ <dimen name="key_preview_offset">16.0dp</dimen>
- <dimen name="key_preview_offset_ics">0.05in</dimen>
+ <dimen name="key_preview_offset_ics">8.0dp</dimen>
<!-- popup_key_height x -0.5 -->
- <dimen name="more_keys_keyboard_vertical_correction_ics">-5mm</dimen>
+ <dimen name="more_keys_keyboard_vertical_correction_ics">-31.5dp</dimen>
<dimen name="suggestions_strip_height">44dp</dimen>
<dimen name="more_suggestions_row_height">44dp</dimen>
<integer name="max_more_suggestions_row">6</integer>
<fraction name="min_more_suggestions_width">90%</fraction>
- <dimen name="suggestions_strip_padding">15.0mm</dimen>
+ <dimen name="suggestions_strip_padding">94.5dp</dimen>
<dimen name="suggestion_min_width">46dp</dimen>
<dimen name="suggestion_padding">8dp</dimen>
<dimen name="suggestion_text_size">22dp</dimen>
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index e33f0ba8a..550f5acf7 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -224,6 +224,8 @@
<attr name="iconDisabledShortcutKey" format="reference" />
<attr name="iconPreviewTabKey" format="reference" />
<attr name="iconLanguageSwitchKey" format="reference" />
+ <attr name="iconZwnjKey" format="reference" />
+ <attr name="iconZwjKey" format="reference" />
</declare-styleable>
<declare-styleable name="Keyboard_Key">
@@ -309,6 +311,8 @@
<enum name="iconSpaceKeyForNumberLayout" value="10" />
<enum name="iconShiftKeyShifted" value="11" />
<enum name="iconLanguageSwitchKey" value="14" />
+ <enum name="iconZwnjKey" value="15" />
+ <enum name="iconZwjKey" value="16" />
</attr>
<!-- The icon for disabled key -->
<attr name="keyIconDisabled" format="enum">
diff --git a/java/res/values/config.xml b/java/res/values/config.xml
index 1aa0dffc9..f0b12e92b 100644
--- a/java/res/values/config.xml
+++ b/java/res/values/config.xml
@@ -54,9 +54,9 @@
<!--
Configuration for LatinKeyboardView
-->
- <dimen name="config_key_hysteresis_distance">0.05in</dimen>
+ <dimen name="config_key_hysteresis_distance">8.0dp</dimen>
<integer name="config_touch_noise_threshold_time">40</integer>
- <dimen name="config_touch_noise_threshold_distance">2.0mm</dimen>
+ <dimen name="config_touch_noise_threshold_distance">12.6dp</dimen>
<bool name="config_sliding_key_input_enabled">true</bool>
<integer name="config_key_repeat_start_timeout">400</integer>
<integer name="config_key_repeat_interval">50</integer>
diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml
index 9d64a618a..1889758b9 100644
--- a/java/res/values/dimens.xml
+++ b/java/res/values/dimens.xml
@@ -25,7 +25,7 @@
<fraction name="maxKeyboardHeight">50%p</fraction>
<fraction name="minKeyboardHeight">-61.8%p</fraction>
- <dimen name="popup_key_height">0.330in</dimen>
+ <dimen name="popup_key_height">52.8dp</dimen>
<dimen name="more_keys_keyboard_horizontal_edges_padding">16dp</dimen>
<dimen name="more_keys_keyboard_key_horizontal_padding">8dp</dimen>
@@ -52,12 +52,10 @@
<!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
<!-- popup_key_height x 1.2 -->
- <dimen name="more_keys_keyboard_slide_allowance">0.396in</dimen>
+ <dimen name="more_keys_keyboard_slide_allowance">63.36dp</dimen>
<!-- popup_key_height x -1.0 -->
- <dimen name="more_keys_keyboard_vertical_correction">-0.330in</dimen>
- <!-- We use "inch", not "dip" because this value tries dealing with physical distance related
- to user's finger. -->
- <dimen name="keyboard_vertical_correction">0.0in</dimen>
+ <dimen name="more_keys_keyboard_vertical_correction">-52.8dp</dimen>
+ <dimen name="keyboard_vertical_correction">0.0dp</dimen>
<fraction name="key_letter_ratio">55%</fraction>
<fraction name="key_large_letter_ratio">65%</fraction>
@@ -68,23 +66,23 @@
<fraction name="key_preview_text_ratio">82%</fraction>
<fraction name="spacebar_text_ratio">33.735%</fraction>
<dimen name="key_preview_height">80dp</dimen>
- <dimen name="key_preview_offset">0.1in</dimen>
+ <dimen name="key_preview_offset">16.0dp</dimen>
<dimen name="key_label_horizontal_padding">4dp</dimen>
<dimen name="key_hint_letter_padding">1dp</dimen>
<dimen name="key_popup_hint_letter_padding">2dp</dimen>
<dimen name="key_uppercase_letter_padding">2dp</dimen>
- <dimen name="key_preview_offset_ics">0.05in</dimen>
+ <dimen name="key_preview_offset_ics">8.0dp</dimen>
<!-- popup_key_height x -0.5 -->
- <dimen name="more_keys_keyboard_vertical_correction_ics">-0.165in</dimen>
+ <dimen name="more_keys_keyboard_vertical_correction_ics">-26.4dp</dimen>
<dimen name="suggestions_strip_height">40dp</dimen>
<dimen name="more_suggestions_key_horizontal_padding">12dp</dimen>
<dimen name="more_suggestions_row_height">40dp</dimen>
<dimen name="more_suggestions_bottom_gap">6dp</dimen>
- <dimen name="more_suggestions_modal_tolerance">0.2in</dimen>
- <dimen name="more_suggestions_slide_allowance">0.1in</dimen>
+ <dimen name="more_suggestions_modal_tolerance">32.0dp</dimen>
+ <dimen name="more_suggestions_slide_allowance">16.0dp</dimen>
<integer name="max_more_suggestions_row">6</integer>
<fraction name="min_more_suggestions_width">90%</fraction>
<fraction name="more_suggestions_info_ratio">18%</fraction>
diff --git a/java/res/values/donottranslate-more-keys.xml b/java/res/values/donottranslate-more-keys.xml
index 6577acdb9..79e12f86a 100644
--- a/java/res/values/donottranslate-more-keys.xml
+++ b/java/res/values/donottranslate-more-keys.xml
@@ -139,6 +139,11 @@
<string name="more_keys_for_symbols_semicolon"></string>
<!-- U+2030: "‰" PER MILLE SIGN -->
<string name="more_keys_for_symbols_percent">&#x2030;</string>
+ <string name="keylabel_for_tablet_comma">,</string>
+ <string name="keyhintlabel_for_tablet_comma">!</string>
+ <string name="more_keys_for_tablet_comma">!</string>
+ <string name="keyhintlabel_for_tablet_period">\?</string>
+ <string name="more_keys_for_tablet_period">\?</string>
<string name="keylabel_for_apostrophe">\'</string>
<string name="keylabel_for_dash">-</string>
<string name="keyhintlabel_for_apostrophe">\"</string>
diff --git a/java/res/values/keyboard-icons-black.xml b/java/res/values/keyboard-icons-black.xml
index 44fc2b9c1..1ff597a49 100644
--- a/java/res/values/keyboard-icons-black.xml
+++ b/java/res/values/keyboard-icons-black.xml
@@ -36,5 +36,8 @@
<item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item>
<!-- TODO: Needs dedicated black theme globe icon -->
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item>
+ <!-- TODO: Needs dedicated black theme ZWNJ and ZWJ icons -->
+ <item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo</item>
+ <item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo</item>
</style>
</resources>
diff --git a/java/res/values/keyboard-icons-ics.xml b/java/res/values/keyboard-icons-ics.xml
index 5fba0253d..0774d57ac 100644
--- a/java/res/values/keyboard-icons-ics.xml
+++ b/java/res/values/keyboard-icons-ics.xml
@@ -34,5 +34,7 @@
<item name="iconDisabledShortcutKey">@drawable/sym_keyboard_voice_off_holo</item>
<item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item>
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item>
+ <item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo</item>
+ <item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo</item>
</style>
</resources>
diff --git a/java/res/values/keyboard-icons-white.xml b/java/res/values/keyboard-icons-white.xml
index 837b1a37a..5798786f8 100644
--- a/java/res/values/keyboard-icons-white.xml
+++ b/java/res/values/keyboard-icons-white.xml
@@ -32,5 +32,8 @@
<item name="iconDisabledShortcutKey">@drawable/sym_keyboard_voice_off_holo</item>
<item name="iconPreviewTabKey">@drawable/sym_keyboard_feedback_tab</item>
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch</item>
+ <!-- TODO: Needs dedicated black theme ZWNJ and ZWJ icons -->
+ <item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo</item>
+ <item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo</item>
</style>
</resources>
diff --git a/java/res/xml-fa/keyboard_set.xml b/java/res/xml-fa/keyboard_set.xml
index 9bd105093..cb62b0dae 100644
--- a/java/res/xml-fa/keyboard_set.xml
+++ b/java/res/xml-fa/keyboard_set.xml
@@ -23,7 +23,7 @@
latin:keyboardLocale="fa" >
<Element
latin:elementName="alphabet"
- latin:elementKeyboard="@xml/kbd_arabic" />
+ latin:elementKeyboard="@xml/kbd_farsi" />
<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
new file mode 100644
index 000000000..077bc6b27
--- /dev/null
+++ b/java/res/xml-is/keyboard_set.xml
@@ -0,0 +1,42 @@
+<?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.
+*/
+-->
+
+<KeyboardSet
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardLocale="is">
+ <Element
+ latin:elementName="alphabet"
+ latin:elementKeyboard="@xml/kbd_nordic" />
+ <Element
+ latin:elementName="symbols"
+ latin:elementKeyboard="@xml/kbd_symbols" />
+ <Element
+ latin:elementName="symbolsShifted"
+ latin:elementKeyboard="@xml/kbd_symbols_shift" />
+ <Element
+ latin:elementName="phone"
+ latin:elementKeyboard="@xml/kbd_phone" />
+ <Element
+ latin:elementName="phoneSymbols"
+ latin:elementKeyboard="@xml/kbd_phone_symbols" />
+ <Element
+ latin:elementName="number"
+ latin:elementKeyboard="@xml/kbd_number" />
+</KeyboardSet>
diff --git a/java/res/xml-sw600dp/key_styles_common.xml b/java/res/xml-sw600dp/key_styles_common.xml
index a263acd9b..77c0efd22 100644
--- a/java/res/xml-sw600dp/key_styles_common.xml
+++ b/java/res/xml-sw600dp/key_styles_common.xml
@@ -78,11 +78,15 @@
latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space"
latin:keyActionFlags="noKeyPreview" />
+ <!-- U+200C: ZERO WIDTH NON-JOINER
+ U+200D: ZERO WIDTH JOINER -->
<key-style
latin:styleName="zwnjKeyStyle"
- latin:keyLabel="&#x200C;"
- latin:moreKeys="&#x200D;"
- latin:keyLabelFlags="hasPopupHint" />
+ latin:code="0x200C"
+ latin:keyIcon="iconZwnjKey"
+ latin:moreKeys="\@icon/zwjKey|&#x200D;"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:keyActionFlags="noKeyPreview" />
<key-style
latin:styleName="smileyKeyStyle"
latin:keyLabel=":-)"
diff --git a/java/res/xml/keys_comma_period.xml b/java/res/xml-sw600dp/keys_comma_period.xml
index 6db02b61d..f5f307be6 100644
--- a/java/res/xml/keys_comma_period.xml
+++ b/java/res/xml-sw600dp/keys_comma_period.xml
@@ -32,14 +32,14 @@
</case>
<default>
<Key
- latin:keyLabel=","
- latin:keyHintLabel="!"
- latin:moreKeys="!"
+ latin:keyLabel="@string/keylabel_for_tablet_comma"
+ latin:keyHintLabel="@string/keyhintlabel_for_tablet_comma"
+ latin:moreKeys="@string/more_keys_for_tablet_comma"
latin:keyStyle="hasShiftedLetterHintStyle" />
<Key
latin:keyLabel="."
- latin:keyHintLabel="\?"
- latin:moreKeys="\?"
+ latin:keyHintLabel="@string/keyhintlabel_for_tablet_period"
+ latin:moreKeys="@string/more_keys_for_tablet_period"
latin:keyStyle="hasShiftedLetterHintStyle" />
</default>
</switch>
diff --git a/java/res/xml-sw600dp/rowkeys_farsi1.xml b/java/res/xml-sw600dp/rowkeys_farsi1.xml
new file mode 100644
index 000000000..ab260a460
--- /dev/null
+++ b/java/res/xml-sw600dp/rowkeys_farsi1.xml
@@ -0,0 +1,66 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <!-- U+0636: "ض" ARABIC LETTER DAD -->
+ <Key
+ latin:keyLabel="&#x0636;" />
+ <!-- U+0635: "ص" ARABIC LETTER SAD -->
+ <Key
+ latin:keyLabel="&#x0635;" />
+ <!-- U+062B: "ث" ARABIC LETTER THEH -->
+ <Key
+ latin:keyLabel="&#x062B;" />
+ <!-- U+0642: "ق" ARABIC LETTER QAF -->
+ <Key
+ latin:keyLabel="&#x0642;" />
+ <!-- U+0641: "ف" ARABIC LETTER FEH -->
+ <Key
+ latin:keyLabel="&#x0641;" />
+ <!-- U+063A: "غ" ARABIC LETTER GHAIN -->
+ <Key
+ latin:keyLabel="&#x063A;" />
+ <!-- U+0639: "ع" ARABIC LETTER AIN -->
+ <Key
+ latin:keyLabel="&#x0639;" />
+ <!-- U+0647: "ه" ARABIC LETTER HEH
+ U+FEEB: "ﻫ" ARABIC LETTER HEH INITIAL FORM
+ U+0647/U+200D: ARABIC LETTER HEH + ZERO WIDTH JOINER
+ U+06C0: "ۀ" ARABIC LETTER HEH WITH YEH ABOVE
+ U+0629: "ة" ARABIC LETTER TEH MARBUTA -->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+06C0 ARABIC LETTER HEH WITH YEH ABOVE -->
+ <Key
+ latin:keyLabel="&#x0647;"
+ latin:moreKeys="&#xFEEB;|&#x0647;&#x200D;,&#x06C0;,&#x0629;,%" />
+ <!-- U+062E: "خ" ARABIC LETTER KHAH -->
+ <Key
+ latin:keyLabel="&#x062E;" />
+ <!-- U+062D: "ح" ARABIC LETTER HAH -->
+ <Key
+ latin:keyLabel="&#x062D;" />
+ <!-- U+062C: "ج" ARABIC LETTER JEEM -->
+ <Key
+ latin:keyLabel="&#x062C;" />
+ <!-- U+0686: "چ" ARABIC LETTER TCHEH -->
+ <Key
+ latin:keyLabel="&#x0686;" />
+</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_farsi2.xml b/java/res/xml-sw600dp/rowkeys_farsi2.xml
new file mode 100644
index 000000000..98e0f2186
--- /dev/null
+++ b/java/res/xml-sw600dp/rowkeys_farsi2.xml
@@ -0,0 +1,70 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <!-- U+0634: "ش" ARABIC LETTER SHEEN -->
+ <Key
+ latin:keyLabel="&#x0634;" />
+ <!-- U+0633: "س" ARABIC LETTER SEEN -->
+ <Key
+ latin:keyLabel="&#x0633;" />
+ <!-- U+06CC: "ی" ARABIC LETTER FARSI YEH
+ U+0626: "ئ" ARABIC LETTER YEH WITH HAMZA ABOVE
+ U+064A: "ي" ARABIC LETTER YEH -->
+ <Key
+ latin:keyLabel="&#x06CC;"
+ latin:moreKeys="&#x0626;,&#x064A;" />
+ <!-- U+0628: "ب" ARABIC LETTER BEH -->
+ <Key
+ latin:keyLabel="&#x0628;" />
+ <!-- U+0644: "ل" ARABIC LETTER LAM -->
+ <Key
+ latin:keyLabel="&#x0644;" />
+ <!-- U+0627: "ا" ARABIC LETTER ALEF
+ U+0621: "ء" ARABIC LETTER HAMZA
+ U+0622: "آ" ARABIC LETTER ALEF WITH MADDA ABOVE
+ U+0672: "ٲ" ARABIC LETTER ALEF WITH WAVY HAMZA ABOVE
+ U+0671: "ٱ" ARABIC LETTER ALEF WASLA
+ U+0673: "ٳ" ARABIC LETTER ALEF WITH WAVY HAMZA BELOW-->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+0672 ARABIC LETTER ALEF WITH WAVY HAMZA ABOVE -->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+0673 ARABIC LETTER ALEF WITH WAVY HAMZA BELOW -->
+ <Key
+ latin:keyLabel="&#x0627;"
+ latin:moreKeys="&#x0621;,&#x0622;,&#x0672;,&#x0671;,&#x0673;" />
+ <!-- U+062A: "ت" ARABIC LETTER TEH -->
+ <Key
+ latin:keyLabel="&#x062A;" />
+ <!-- U+0646: "ن" ARABIC LETTER NOON -->
+ <Key
+ latin:keyLabel="&#x0646;" />
+ <!-- U+0645: "م" ARABIC LETTER MEEM -->
+ <Key
+ latin:keyLabel="&#x0645;" />
+ <!-- U+06A9: "ک" ARABIC LETTER KEHEH
+ U+0643: "ك" ARABIC LETTER KAF -->
+ <Key
+ latin:keyLabel="&#x06A9;"
+ latin:moreKeys="&#x0643;" />
+ <!-- U+06AF: "گ" ARABIC LETTER GAF -->
+ <Key
+ latin:keyLabel="&#x06AF;" />
+</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_farsi3.xml b/java/res/xml-sw600dp/rowkeys_farsi3.xml
new file mode 100644
index 000000000..c80c14a55
--- /dev/null
+++ b/java/res/xml-sw600dp/rowkeys_farsi3.xml
@@ -0,0 +1,53 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <!-- U+0638: "ظ" ARABIC LETTER ZAH -->
+ <Key
+ latin:keyLabel="&#x0638;" />
+ <!-- U+0637: "ط" ARABIC LETTER TAH -->
+ <Key
+ latin:keyLabel="&#x0637;" />
+ <!-- U+0632: "ز" ARABIC LETTER ZAIN
+ U+0698: "ژ" ARABIC LETTER JEH -->
+ <Key
+ latin:keyLabel="&#x0632;"
+ latin:moreKeys="&#x0698;" />
+ <!-- U+0631: "ر" ARABIC LETTER REH -->
+ <Key
+ latin:keyLabel="&#x0631;" />
+ <!-- U+0630: "ذ" ARABIC LETTER THAL -->
+ <Key
+ latin:keyLabel="&#x0630;" />
+ <!-- U+062F: "د" ARABIC LETTER DAL -->
+ <Key
+ latin:keyLabel="&#x062F;" />
+ <!-- U+067E: "پ" ARABIC LETTER PEH -->
+ <Key
+ latin:keyLabel="&#x067E;" />
+ <!-- U+0648: "و" ARABIC LETTER WAW
+ U+0676: "ٶ" ARABIC LETTER HIGH HAMZA WAW -->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+0676 ARABIC LETTER HIGH HAMZA WAW -->
+ <Key
+ latin:keyLabel="&#x0648;"
+ latin:moreKeys="&#x0676;" />
+</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_thai3.xml b/java/res/xml-sw600dp/rowkeys_thai3.xml
index 529d7bff0..abd67631c 100644
--- a/java/res/xml-sw600dp/rowkeys_thai3.xml
+++ b/java/res/xml-sw600dp/rowkeys_thai3.xml
@@ -82,13 +82,13 @@
latin:keyLabel="&#x0E48;" />
<!-- U+0E32: "า" THAI CHARACTER SARA AA -->
<Key
- latin:keyLabel="&#x0E46;" />
+ latin:keyLabel="&#x0E32;" />
<!-- U+0E2A: "ส" THAI CHARACTER SO SUA -->
<Key
- latin:keyLabel="&#x0E46;" />
+ latin:keyLabel="&#x0E2A;" />
<!-- U+0E27: "ว" THAI CHARACTER WO WAEN -->
<Key
- latin:keyLabel="&#x0E2F;" />
+ latin:keyLabel="&#x0E27;" />
<!-- U+0E07: "ง" THAI CHARACTER NGO NGU -->
<Key
latin:keyLabel="&#x0E07;" />
diff --git a/java/res/xml-sw600dp/rows_farsi.xml b/java/res/xml-sw600dp/rows_farsi.xml
new file mode 100644
index 000000000..75800420a
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_farsi.xml
@@ -0,0 +1,62 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/key_styles_common" />
+ <Row
+ latin:keyWidth="7.6%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi1" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="7.6%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi2"
+ latin:keyXPos="4.5%p" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="7.6%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.0%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi3" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <include
+ latin:keyboardLayout="@xml/key_smiley"
+ latin:keyXPos="-9.0%p"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml-sw768dp/key_styles_common.xml b/java/res/xml-sw768dp/key_styles_common.xml
index fade151ed..f4a1a4ea5 100644
--- a/java/res/xml-sw768dp/key_styles_common.xml
+++ b/java/res/xml-sw768dp/key_styles_common.xml
@@ -77,11 +77,15 @@
latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space"
latin:keyActionFlags="noKeyPreview" />
+ <!-- U+200C: ZERO WIDTH NON-JOINER
+ U+200D: ZERO WIDTH JOINER -->
<key-style
latin:styleName="zwnjKeyStyle"
- latin:keyLabel="&#x200C;"
- latin:moreKeys="&#x200D;"
- latin:keyLabelFlags="hasPopupHint" />
+ latin:code="0x200C"
+ latin:keyIcon="iconZwnjKey"
+ latin:moreKeys="\@icon/zwjKey|&#x200D;"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:keyActionFlags="noKeyPreview" />
<key-style
latin:styleName="smileyKeyStyle"
latin:keyLabel=":-)"
diff --git a/java/res/xml-sw768dp/row_qwerty4.xml b/java/res/xml-sw768dp/row_qwerty4.xml
index 0aa04f8f7..90da21ba3 100644
--- a/java/res/xml-sw768dp/row_qwerty4.xml
+++ b/java/res/xml-sw768dp/row_qwerty4.xml
@@ -87,11 +87,7 @@
<!-- U+200C: "" ZERO WIDTH NON-JOINER
U+200D: "" ZERO WIDTH JOINER -->
<Key
- latin:keyLabel="&#x200C;"
- latin:moreKeys="&#x200D;"
- latin:keyLabelFlags="hasPopupHint"
- latin:altCode="@integer/key_space"
- latin:keyActionFlags="altCodeWhileTyping" />
+ latin:keyStyle="zwnjKeyStyle" />
</case>
<default>
<Key
diff --git a/java/res/xml-sw768dp/rows_farsi.xml b/java/res/xml-sw768dp/rows_farsi.xml
new file mode 100644
index 000000000..b969ff21c
--- /dev/null
+++ b/java/res/xml-sw768dp/rows_farsi.xml
@@ -0,0 +1,69 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/key_styles_common" />
+ <Row
+ latin:keyWidth="7.125%p"
+ >
+ <Key
+ latin:keyStyle="tabKeyStyle"
+ latin:keyLabelFlags="alignLeft" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi1" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="7.125%p"
+ >
+ <Key
+ latin:keyStyle="toSymbolKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="11.172%p"/>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi2" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyXPos="-9.375%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="7.375%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="13.829%p"/>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi3" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyXPos="-13.750%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml/kbd_farsi.xml b/java/res/xml/kbd_farsi.xml
new file mode 100644
index 000000000..1af4e61ca
--- /dev/null
+++ b/java/res/xml/kbd_farsi.xml
@@ -0,0 +1,26 @@
+<?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.
+*/
+-->
+
+<Keyboard
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/rows_farsi" />
+</Keyboard>
diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml
index 087b8952f..66d8d4d9d 100644
--- a/java/res/xml/key_styles_common.xml
+++ b/java/res/xml/key_styles_common.xml
@@ -107,11 +107,15 @@
latin:code="@integer/key_space"
latin:keyActionFlags="noKeyPreview|enableLongPress"
latin:backgroundType="functional" />
+ <!-- U+200C: ZERO WIDTH NON-JOINER
+ U+200D: ZERO WIDTH JOINER -->
<key-style
latin:styleName="zwnjKeyStyle"
- latin:keyLabel="&#x200C;"
- latin:moreKeys="&#x200D;"
+ latin:code="0x200C"
+ latin:keyIcon="iconZwnjKey"
+ latin:moreKeys="\@icon/zwjKey|&#x200D;"
latin:keyLabelFlags="hasPopupHint"
+ latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
<key-style
latin:styleName="shortcutKeyStyle"
@@ -129,8 +133,6 @@
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
latin:altCode="@integer/key_space"
latin:backgroundType="functional" />
- <!-- U+200C: "" ZERO WIDTH NON-JOINER
- U+200D: "" ZERO WIDTH JOINER -->
<key-style
latin:styleName="tabKeyStyle"
latin:code="@integer/key_tab"
diff --git a/java/res/xml/key_styles_currency.xml b/java/res/xml/key_styles_currency.xml
index 3e4afdfb5..bd1d959e4 100644
--- a/java/res/xml/key_styles_currency.xml
+++ b/java/res/xml/key_styles_currency.xml
@@ -79,9 +79,39 @@
<case
latin:languageCode="iw"
>
+ <!-- U+20AA: "₪" NEW SHEQEL SIGN
+ U+00A3: "£" POUND SIGN
+ U+20AC: "€" EURO SIGN
+ U+00A2: "¢" CENT SIGN -->
<key-style
latin:styleName="currencyKeyStyle"
- latin:keyLabel="₪"
+ latin:keyLabel="&#x20AA;"
+ latin:moreKeys="@string/more_keys_for_currency_general" />
+ <key-style
+ latin:styleName="moreCurrency1KeyStyle"
+ latin:keyLabel="&#x00A3;" />
+ <key-style
+ latin:styleName="moreCurrency2KeyStyle"
+ latin:keyLabel="&#x20AC;" />
+ <key-style
+ latin:styleName="moreCurrency3KeyStyle"
+ latin:keyLabel="$"
+ latin:moreKeys="&#x00A2;" />
+ <key-style
+ latin:styleName="moreCurrency4KeyStyle"
+ latin:keyLabel="&#x00A2;" />
+ </case>
+ <case
+ latin:languageCode="fa"
+ >
+ <!-- U+FDFC: "﷼" RIAL SIGN
+ U+00A3: "£" POUND SIGN
+ U+20AC: "€" EURO SIGN
+ U+00A2: "¢" CENT SIGN -->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+FCDC: RIAL SIGN -->
+ <key-style
+ latin:styleName="currencyKeyStyle"
+ latin:keyLabel="&#xFDFC;"
latin:moreKeys="@string/more_keys_for_currency_general" />
<key-style
latin:styleName="moreCurrency1KeyStyle"
@@ -101,23 +131,27 @@
<case
latin:countryCode="GB"
>
+ <!-- U+00A3: "£" POUND SIGN
+ U+20AC: "€" EURO SIGN
+ U+00A5: "¥" YEN SIGN
+ U+00A2: "¢" CENT SIGN -->
<key-style
latin:styleName="currencyKeyStyle"
- latin:keyLabel="£"
+ latin:keyLabel="&#x00A3;"
latin:moreKeys="@string/more_keys_for_currency_pound" />
<key-style
latin:styleName="moreCurrency1KeyStyle"
- latin:keyLabel="€" />
+ latin:keyLabel="&#x20AC;" />
<key-style
latin:styleName="moreCurrency2KeyStyle"
- latin:keyLabel="¥" />
+ latin:keyLabel="&#x00A5;" />
<key-style
latin:styleName="moreCurrency3KeyStyle"
latin:keyLabel="$"
- latin:moreKeys="¢" />
+ latin:moreKeys="&#x00A2;" />
<key-style
latin:styleName="moreCurrency4KeyStyle"
- latin:keyLabel="¢" />
+ latin:keyLabel="&#x00A2;" />
</case>
<default>
<include
diff --git a/java/res/xml/key_styles_currency_dollar.xml b/java/res/xml/key_styles_currency_dollar.xml
index d5dca2afa..8dd849879 100644
--- a/java/res/xml/key_styles_currency_dollar.xml
+++ b/java/res/xml/key_styles_currency_dollar.xml
@@ -19,20 +19,24 @@
-->
<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+ <!-- U+00A3: "£" POUND SIGN
+ U+00A2: "¢" CENT SIGN
+ U+20AC: "€" EURO SIGN
+ U+00A5: "¥" YEN SIGN -->
<key-style
latin:styleName="currencyKeyStyle"
latin:keyLabel="$"
latin:moreKeys="@string/more_keys_for_currency_dollar" />
<key-style
latin:styleName="moreCurrency1KeyStyle"
- latin:keyLabel="£" />
+ latin:keyLabel="&#x00A3;" />
<key-style
latin:styleName="moreCurrency2KeyStyle"
- latin:keyLabel="¢" />
+ latin:keyLabel="&#x00A2;" />
<key-style
latin:styleName="moreCurrency3KeyStyle"
- latin:keyLabel="€" />
+ latin:keyLabel="&#x20AC;" />
<key-style
latin:styleName="moreCurrency4KeyStyle"
- latin:keyLabel="¥" />
+ latin:keyLabel="&#x00A5;" />
</merge>
diff --git a/java/res/xml/key_styles_currency_euro.xml b/java/res/xml/key_styles_currency_euro.xml
index 6edddf074..0573e0991 100644
--- a/java/res/xml/key_styles_currency_euro.xml
+++ b/java/res/xml/key_styles_currency_euro.xml
@@ -19,21 +19,25 @@
-->
<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+ <!-- U+20AC: "€" EURO SIGN
+ U+00A3: "£" POUND SIGN
+ U+00A5: "¥" YEN SIGN
+ U+00A2: "¢" CENT SIGN -->
<key-style
latin:styleName="currencyKeyStyle"
- latin:keyLabel="€"
+ latin:keyLabel="&#x20AC;"
latin:moreKeys="@string/more_keys_for_currency_euro" />
<key-style
latin:styleName="moreCurrency1KeyStyle"
- latin:keyLabel="£" />
+ latin:keyLabel="&#x00A3;" />
<key-style
latin:styleName="moreCurrency2KeyStyle"
- latin:keyLabel="¥" />
+ latin:keyLabel="&#x00A5;" />
<key-style
latin:styleName="moreCurrency3KeyStyle"
latin:keyLabel="$"
- latin:moreKeys="¢" />
+ latin:moreKeys="&#x00A2;" />
<key-style
latin:styleName="moreCurrency4KeyStyle"
- latin:keyLabel="¢" />
+ latin:keyLabel="&#x00A2;" />
</merge>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 544f3fd64..1cdd68ad9 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -41,6 +41,7 @@
hi: Hindi/hindi
hr: Croatian/qwertz
hu: Hungarian/qwertz
+ is: Icelandic/qwerty
it: Italian/qwerty
iw: Hebrew/hebrew
ka: Georgian/georgian
@@ -191,6 +192,12 @@
/>
<subtype android:icon="@drawable/ic_subtype_keyboard"
android:label="@string/subtype_generic"
+ android:imeSubtypeLocale="is"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:label="@string/subtype_generic"
android:imeSubtypeLocale="it"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection"
diff --git a/java/res/xml/rowkeys_farsi1.xml b/java/res/xml/rowkeys_farsi1.xml
new file mode 100644
index 000000000..15cb80182
--- /dev/null
+++ b/java/res/xml/rowkeys_farsi1.xml
@@ -0,0 +1,90 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <!-- U+0635: "ص" ARABIC LETTER SAD
+ U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE -->
+ <Key
+ latin:keyLabel="&#x0635;"
+ latin:keyHintLabel="1"
+ latin:additionalMoreKeys="1,&#x06F1;" />
+ <!-- U+0642: "ق" ARABIC LETTER QAF
+ U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO -->
+ <Key
+ latin:keyLabel="&#x0642;"
+ latin:keyHintLabel="2"
+ latin:additionalMoreKeys="2,&#x06F2;" />
+ <!-- U+0641: "ف" ARABIC LETTER FEH
+ U+06F3: "۳" EXTENDED ARABIC-INDIC DIGIT THREE -->
+ <Key
+ latin:keyLabel="&#x0641;"
+ latin:keyHintLabel="3"
+ latin:additionalMoreKeys="3,&#x06F3;" />
+ <!-- U+063A: "غ" ARABIC LETTER GHAIN
+ U+06F4: "۴" EXTENDED ARABIC-INDIC DIGIT FOUR -->
+ <Key
+ latin:keyLabel="&#x063A;"
+ latin:keyHintLabel="4"
+ latin:additionalMoreKeys="4,&#x06F4;" />
+ <!-- U+0639: "ع" ARABIC LETTER AIN
+ U+06F5: "۵" EXTENDED ARABIC-INDIC DIGIT FIVE -->
+ <Key
+ latin:keyLabel="&#x0639;"
+ latin:keyHintLabel="5"
+ latin:additionalMoreKeys="5,&#x06F5;" />
+ <!-- U+0647: "ه" ARABIC LETTER HEH
+ U+FEEB: "ﻫ" ARABIC LETTER HEH INITIAL FORM
+ U+0647/U+200D: ARABIC LETTER HEH + ZERO WIDTH JOINER
+ U+06C0: "ۀ" ARABIC LETTER HEH WITH YEH ABOVE
+ U+0629: "ة" ARABIC LETTER TEH MARBUTA
+ U+06F6: "۶" EXTENDED ARABIC-INDIC DIGIT SIX -->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+06C0 ARABIC LETTER HEH WITH YEH ABOVE -->
+ <Key
+ latin:keyLabel="&#x0647;"
+ latin:moreKeys="&#xFEEB;|&#x0647;&#x200D;,&#x06C0;,&#x0629;,%"
+ latin:keyHintLabel="6"
+ latin:additionalMoreKeys="6,&#x06F6;" />
+ <!-- U+062E: "خ" ARABIC LETTER KHAH
+ U+06F7: "۷" EXTENDED ARABIC-INDIC DIGIT SEVEN -->
+ <Key
+ latin:keyLabel="&#x062E;"
+ latin:keyHintLabel="7"
+ latin:additionalMoreKeys="7,&#x06F7;" />
+ <!-- U+062D: "ح" ARABIC LETTER HAH
+ U+06F8: "۸" EXTENDED ARABIC-INDIC DIGIT EIGHT -->
+ <Key
+ latin:keyLabel="&#x062D;"
+ latin:keyHintLabel="8"
+ latin:additionalMoreKeys="8,&#x06F8;" />
+ <!-- U+062C: "ج" ARABIC LETTER JEEM
+ U+06F9: "۹" EXTENDED ARABIC-INDIC DIGIT NINE -->
+ <Key
+ latin:keyLabel="&#x062C;"
+ latin:keyHintLabel="9"
+ latin:additionalMoreKeys="9,&#x06F9;" />
+ <!-- U+0686: "چ" ARABIC LETTER TCHEH
+ U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO -->
+ <Key
+ latin:keyLabel="&#x0686;"
+ latin:keyHintLabel="0"
+ latin:additionalMoreKeys="0,&#x06F0;" />
+</merge>
diff --git a/java/res/xml/rowkeys_farsi2.xml b/java/res/xml/rowkeys_farsi2.xml
new file mode 100644
index 000000000..77279c60f
--- /dev/null
+++ b/java/res/xml/rowkeys_farsi2.xml
@@ -0,0 +1,71 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <!-- U+0634: "ش" ARABIC LETTER SHEEN -->
+ <Key
+ latin:keyLabel="&#x0634;" />
+ <!-- U+0633: "س" ARABIC LETTER SEEN
+ U+0636: "ض" ARABIC LETTER DAD -->
+ <Key
+ latin:keyLabel="&#x0633;"
+ latin:moreKeys="&#x0636;" />
+ <!-- U+06CC: "ی" ARABIC LETTER FARSI YEH
+ U+0626: "ئ" ARABIC LETTER YEH WITH HAMZA ABOVE
+ U+064A: "ي" ARABIC LETTER YEH -->
+ <Key
+ latin:keyLabel="&#x06CC;"
+ latin:moreKeys="&#x0626;,&#x064A;" />
+ <!-- U+0628: "ب" ARABIC LETTER BEH -->
+ <Key
+ latin:keyLabel="&#x0628;" />
+ <!-- U+0644: "ل" ARABIC LETTER LAM -->
+ <Key
+ latin:keyLabel="&#x0644;" />
+ <!-- U+0627: "ا" ARABIC LETTER ALEF
+ U+0621: "ء" ARABIC LETTER HAMZA
+ U+0622: "آ" ARABIC LETTER ALEF WITH MADDA ABOVE
+ U+0672: "ٲ" ARABIC LETTER ALEF WITH WAVY HAMZA ABOVE
+ U+0671: "ٱ" ARABIC LETTER ALEF WASLA
+ U+0673: "ٳ" ARABIC LETTER ALEF WITH WAVY HAMZA BELOW-->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+0672 ARABIC LETTER ALEF WITH WAVY HAMZA ABOVE -->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+0673 ARABIC LETTER ALEF WITH WAVY HAMZA BELOW -->
+ <Key
+ latin:keyLabel="&#x0627;"
+ latin:moreKeys="&#x0621;,&#x0622;,&#x0672;,&#x0671;,&#x0673;" />
+ <!-- U+062A: "ت" ARABIC LETTER TEH
+ U+062B: "ﺙ" ARABIC LETTER THEH -->
+ <Key
+ latin:keyLabel="&#x062A;"
+ latin:moreKeys="&#x062B;" />
+ <!-- U+0646: "ن" ARABIC LETTER NOON -->
+ <Key
+ latin:keyLabel="&#x0646;" />
+ <!-- U+0645: "م" ARABIC LETTER MEEM -->
+ <Key
+ latin:keyLabel="&#x0645;" />
+ <!-- U+06A9: "ک" ARABIC LETTER KEHEH
+ U+0643: "ك" ARABIC LETTER KAF -->
+ <Key
+ latin:keyLabel="&#x06A9;"
+ latin:moreKeys="&#x0643;" />
+</merge>
diff --git a/java/res/xml/rowkeys_farsi3.xml b/java/res/xml/rowkeys_farsi3.xml
new file mode 100644
index 000000000..8db56e340
--- /dev/null
+++ b/java/res/xml/rowkeys_farsi3.xml
@@ -0,0 +1,55 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <!-- U+0637: "ط" ARABIC LETTER TAH
+ U+0638: "ظ" ARABIC LETTER ZAH -->
+ <Key
+ latin:keyLabel="&#x0637;"
+ latin:moreKeys="&#x0638;" />
+ <!-- U+0698: "ژ" ARABIC LETTER JEH -->
+ <Key
+ latin:keyLabel="&#x0698;" />
+ <!-- U+0632: "ز" ARABIC LETTER ZAIN -->
+ <Key
+ latin:keyLabel="&#x0632;" />
+ <!-- U+0631: "ر" ARABIC LETTER REH -->
+ <Key
+ latin:keyLabel="&#x0631;" />
+ <!-- U+062F: "د" ARABIC LETTER DAL
+ U+0630: "ذ" ARABIC LETTER THAL -->
+ <Key
+ latin:keyLabel="&#x062F;"
+ latin:moreKeys="&#x0630;" />
+ <!-- U+067E: "پ" ARABIC LETTER PEH -->
+ <Key
+ latin:keyLabel="&#x067E;" />
+ <!-- U+0648: "و" ARABIC LETTER WAW
+ U+0676: "ٶ" ARABIC LETTER HIGH HAMZA WAW -->
+ <!-- TODO: DroidSansArabic lacks the glyph of U+0676 ARABIC LETTER HIGH HAMZA WAW -->
+ <Key
+ latin:keyLabel="&#x0648;"
+ latin:moreKeys="&#x0676;" />
+ <!-- U+06AF: "گ" ARABIC LETTER GAF -->
+ <Key
+ latin:keyLabel="&#x06AF;" />
+</merge>
diff --git a/java/res/xml/rowkeys_thai2.xml b/java/res/xml/rowkeys_thai2.xml
index a5db66519..02ea6c5f8 100644
--- a/java/res/xml/rowkeys_thai2.xml
+++ b/java/res/xml/rowkeys_thai2.xml
@@ -46,9 +46,11 @@
<!-- U+0E0B: "ซ" THAI CHARACTER SO SO -->
<Key
latin:keyLabel="&#x0E0B;" />
- <!-- U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT -->
+ <!-- U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT
+ U+0E45: "ๅ" THAI CHARACTER LAKKHANGYAO -->
<Key
- latin:keyLabel="&#x0E3F;" />
+ latin:keyLabel="&#x0E3F;"
+ latin:moreKeys="&#x0E45;" />
<!-- U+0E46: "ๆ" THAI CHARACTER MAIYAMOK
U+0E2F: "ฯ" THAI CHARACTER PAIYANNOI -->
<Key
diff --git a/java/res/xml/rows_farsi.xml b/java/res/xml/rows_farsi.xml
new file mode 100644
index 000000000..cc0c526b3
--- /dev/null
+++ b/java/res/xml/rows_farsi.xml
@@ -0,0 +1,51 @@
+<?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.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/key_styles_common" />
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi1" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi2" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_farsi3"
+ latin:keyXPos="5.0%p" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight"
+ latin:visualInsetsLeft="1%p" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index 07b9c1e8c..962379016 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -394,7 +394,7 @@ public class Keyboard {
* &gt;Row row_attributes*&lt;
* &gt;!-- Row Content --&lt;
* &gt;Key key_attributes* /&lt;
- * &gt;Spacer horizontalGap="0.2in" /&lt;
+ * &gt;Spacer horizontalGap="32.0dp" /&lt;
* &gt;include keyboardLayout="@xml/other_keys"&lt;
* ...
* &gt;/Row&lt;
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index 3f6c37477..7194cced3 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -52,6 +52,7 @@ import com.android.inputmethod.latin.StringUtils;
import com.android.inputmethod.latin.SubtypeUtils;
import com.android.inputmethod.latin.Utils;
import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils;
+import com.android.inputmethod.latin.define.ProductionFlag;
import java.util.Locale;
import java.util.WeakHashMap;
@@ -694,15 +695,17 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
+ size + "," + pressure);
}
}
- if (ResearchLogger.sIsLogging) {
- // TODO: remove redundant calculations of size and pressure by
- // removing UsabilityStudyLog code once the ResearchLogger is mature enough
- final float size = me.getSize(index);
- final float pressure = me.getPressure(index);
- if (action != MotionEvent.ACTION_MOVE) {
- // Skip ACTION_MOVE events as they are logged below
- ResearchLogger.getInstance().logMotionEvent(action, eventTime, id, x,
- y, size, pressure);
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ if (ResearchLogger.sIsLogging) {
+ // TODO: remove redundant calculations of size and pressure by
+ // removing UsabilityStudyLog code once the ResearchLogger is mature enough
+ final float size = me.getSize(index);
+ final float pressure = me.getPressure(index);
+ if (action != MotionEvent.ACTION_MOVE) {
+ // Skip ACTION_MOVE events as they are logged below
+ ResearchLogger.getInstance().logMotionEvent(action, eventTime, id, x, y,
+ size, pressure);
+ }
}
}
@@ -770,12 +773,14 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
+ pointerId + "," + px + "," + py + ","
+ pointerSize + "," + pointerPressure);
}
- if (ResearchLogger.sIsLogging) {
- // TODO: earlier comment about redundant calculations applies here too
- final float pointerSize = me.getSize(i);
- final float pointerPressure = me.getPressure(i);
- ResearchLogger.getInstance().logMotionEvent(action, eventTime, pointerId,
- px, py, pointerSize, pointerPressure);
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ if (ResearchLogger.sIsLogging) {
+ // TODO: earlier comment about redundant calculations applies here too
+ final float pointerSize = me.getSize(i);
+ final float pointerPressure = me.getPressure(i);
+ ResearchLogger.getInstance().logMotionEvent(action, eventTime, pointerId,
+ px, py, pointerSize, pointerPressure);
+ }
}
}
} else {
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
index 9b9c86179..ded89b1b8 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
@@ -30,7 +30,7 @@ public class KeyboardIconsSet {
// The value should be aligned with the enum value of Key.keyIcon.
public static final int ICON_UNDEFINED = 0;
- private static final int NUM_ICONS = 14;
+ private static final int NUM_ICONS = 16;
private final Drawable[] mIcons = new Drawable[NUM_ICONS + 1];
@@ -58,6 +58,8 @@ public class KeyboardIconsSet {
addIconIdMap(12, "disabledShortcurKey", R.styleable.Keyboard_iconDisabledShortcutKey);
addIconIdMap(13, "previewTabKey", R.styleable.Keyboard_iconPreviewTabKey);
addIconIdMap(14, "languageSwitchKey", R.styleable.Keyboard_iconLanguageSwitchKey);
+ addIconIdMap(15, "zwnjKey", R.styleable.Keyboard_iconZwnjKey);
+ addIconIdMap(16, "zwjKey", R.styleable.Keyboard_iconZwjKey);
}
private static void addIconIdMap(int iconId, String name, int attrId) {
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index a9df1ce12..9909638d4 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -144,9 +144,7 @@ public class BinaryDictionary extends Dictionary {
int codesSize = codes.size();
Arrays.fill(mInputCodes, -1);
if (codesSize > 0) {
- int[] alternatives = codes.getCodesAt(0);
- System.arraycopy(alternatives, 0, mInputCodes, 0,
- Math.min(alternatives.length, MAX_PROXIMITY_CHARS_SIZE));
+ mInputCodes[0] = codes.getCodeAt(0);
}
int count = getBigramsNative(mNativeDict, chars, chars.length, mInputCodes, codesSize,
@@ -205,11 +203,7 @@ public class BinaryDictionary extends Dictionary {
Arrays.fill(mInputCodes, WordComposer.NOT_A_CODE);
for (int i = 0; i < codesSize; i++) {
- final int[] alternatives = codes.getCodesAt(i);
- if (alternatives == null || alternatives.length < 1) {
- continue;
- }
- mInputCodes[i] = alternatives[0];
+ mInputCodes[i] = codes.getCodeAt(i);
}
Arrays.fill(outputChars, (char) 0);
Arrays.fill(scores, 0);
diff --git a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
index 8e8adc1c2..f8de029bd 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
@@ -210,7 +210,11 @@ public class ExpandableDictionary extends Dictionary {
if (mCodes.length < mInputLength) mCodes = new int[mInputLength][];
// Cache the codes so that we don't have to lookup an array list
for (int i = 0; i < mInputLength; i++) {
- mCodes[i] = codes.getCodesAt(i);
+ // TODO: Calculate proximity info here.
+ if (mCodes[i] == null || mCodes[i].length < 1) {
+ mCodes[i] = new int[1];
+ }
+ mCodes[i][0] = codes.getCodeAt(i);
}
mMaxDepth = mInputLength * 3;
getWordsRec(mRoots, codes, mWordBuilder, 0, false, 1, 0, -1, callback);
@@ -319,7 +323,7 @@ public class ExpandableDictionary extends Dictionary {
}
} else {
// Don't use alternatives if we're looking for missing characters
- final int alternativesSize = skipPos >= 0? 1 : currentChars.length;
+ final int alternativesSize = skipPos >= 0 ? 1 : currentChars.length;
for (int j = 0; j < alternativesSize; j++) {
final int addedAttenuation = (j > 0 ? 1 : 2);
final int currentChar = currentChars[j];
diff --git a/java/src/com/android/inputmethod/latin/LastComposedWord.java b/java/src/com/android/inputmethod/latin/LastComposedWord.java
index bc0792434..af0ef4b37 100644
--- a/java/src/com/android/inputmethod/latin/LastComposedWord.java
+++ b/java/src/com/android/inputmethod/latin/LastComposedWord.java
@@ -18,8 +18,6 @@ package com.android.inputmethod.latin;
import android.text.TextUtils;
-import java.util.ArrayList;
-
/**
* This class encapsulates data about a word previously composed, but that has been
* committed already. This is used for resuming suggestion, and cancel auto-correction.
@@ -42,7 +40,7 @@ public class LastComposedWord {
public static final int NOT_A_SEPARATOR = -1;
- public final ArrayList<int[]> mCodes;
+ public final int[] mPrimaryKeyCodes;
public final int[] mXCoordinates;
public final int[] mYCoordinates;
public final String mTypedWord;
@@ -56,10 +54,10 @@ public class LastComposedWord {
// Warning: this is using the passed objects as is and fully expects them to be
// immutable. Do not fiddle with their contents after you passed them to this constructor.
- public LastComposedWord(final ArrayList<int[]> codes, final int[] xCoordinates,
+ public LastComposedWord(final int[] primaryKeyCodes, final int[] xCoordinates,
final int[] yCoordinates, final String typedWord, final String committedWord,
final int separatorCode) {
- mCodes = codes;
+ mPrimaryKeyCodes = primaryKeyCodes;
mXCoordinates = xCoordinates;
mYCoordinates = yCoordinates;
mTypedWord = typedWord;
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 7272006a2..0669ee668 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -69,6 +69,7 @@ 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;
import java.io.FileDescriptor;
@@ -439,7 +440,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
mPrefs = prefs;
LatinImeLogger.init(this, prefs);
- ResearchLogger.init(this, prefs);
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.init(this, prefs);
+ }
LanguageSwitcherProxy.init(this, prefs);
InputMethodManagerCompatWrapper.init(this);
SubtypeSwitcher.init(this);
@@ -1264,8 +1267,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
mLastKeyTime = when;
- if (ResearchLogger.sIsLogging) {
- ResearchLogger.getInstance().logKeyEvent(primaryCode, x, y);
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ if (ResearchLogger.sIsLogging) {
+ ResearchLogger.getInstance().logKeyEvent(primaryCode, x, y);
+ }
}
final KeyboardSwitcher switcher = mKeyboardSwitcher;
diff --git a/java/src/com/android/inputmethod/latin/LatinImeLogger.java b/java/src/com/android/inputmethod/latin/LatinImeLogger.java
index 079f3b5dd..732efadd6 100644
--- a/java/src/com/android/inputmethod/latin/LatinImeLogger.java
+++ b/java/src/com/android/inputmethod/latin/LatinImeLogger.java
@@ -80,8 +80,4 @@ public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChang
public static void onPrintAllUsabilityStudyLogs() {
}
-
- public static boolean isResearcherPackage(Context context) {
- return false;
- }
}
diff --git a/java/src/com/android/inputmethod/latin/ResearchLogger.java b/java/src/com/android/inputmethod/latin/ResearchLogger.java
index 6ba9118d6..0694ffe77 100644
--- a/java/src/com/android/inputmethod/latin/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/latin/ResearchLogger.java
@@ -41,7 +41,7 @@ import java.util.Date;
* This class logs operations on the IME keyboard, including what the user has typed.
* Data is stored locally in a file in app-specific storage.
*
- * This functionality is off by default.
+ * This functionality is off by default. See {@link ProductionFlag.IS_EXPERIMENTAL}.
*/
public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = ResearchLogger.class.getSimpleName();
@@ -49,7 +49,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
private static final ResearchLogger sInstance = new ResearchLogger(new LogFileManager());
public static boolean sIsLogging = false;
- private final Handler mLoggingHandler;
+ /* package */ final Handler mLoggingHandler;
private InputMethodService mIms;
private final Date mDate;
private final SimpleDateFormat mDateFormat;
@@ -183,11 +183,13 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
}
/**
- * Change to a different logFileManager. Will not allow it to be set to null.
+ * Change to a different logFileManager.
+ *
+ * @throws IllegalArgumentException if logFileManager is null
*/
- /* package */ void setLogFileManager(ResearchLogger.LogFileManager manager) {
+ void setLogFileManager(LogFileManager manager) {
if (manager == null) {
- Log.w(TAG, "warning: trying to set null logFileManager. ignoring.");
+ throw new IllegalArgumentException("warning: trying to set null logFileManager");
} else {
mLogFileManager = manager;
}
@@ -241,8 +243,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
sb.append('\t'); sb.append(x);
sb.append('\t'); sb.append(y);
write(LogGroup.KEY, sb.toString());
-
- LatinImeLogger.onPrintAllUsabilityStudyLogs();
}
public void logCorrection(String subgroup, String before, String after, int position) {
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java
index 72391f31e..110264892 100644
--- a/java/src/com/android/inputmethod/latin/Settings.java
+++ b/java/src/com/android/inputmethod/latin/Settings.java
@@ -46,6 +46,7 @@ import com.android.inputmethod.compat.CompatUtils;
import com.android.inputmethod.compat.InputMethodServiceCompatWrapper;
import com.android.inputmethod.compat.VibratorCompatWrapper;
import com.android.inputmethod.deprecated.VoiceProxy;
+import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethodcommon.InputMethodSettingsActivity;
import java.util.Locale;
@@ -238,17 +239,16 @@ public class Settings extends InputMethodSettingsActivity
textCorrectionGroup.removePreference(dictionaryLink);
}
- final boolean isResearcherPackage = LatinImeLogger.isResearcherPackage(this);
final boolean showUsabilityStudyModeOption =
res.getBoolean(R.bool.config_enable_usability_study_mode_option)
- || isResearcherPackage || ENABLE_EXPERIMENTAL_SETTINGS;
+ || ProductionFlag.IS_EXPERIMENTAL || ENABLE_EXPERIMENTAL_SETTINGS;
final Preference usabilityStudyPref = findPreference(PREF_USABILITY_STUDY_MODE);
if (!showUsabilityStudyModeOption) {
if (usabilityStudyPref != null) {
miscSettings.removePreference(usabilityStudyPref);
}
}
- if (isResearcherPackage) {
+ if (ProductionFlag.IS_EXPERIMENTAL) {
if (usabilityStudyPref instanceof CheckBoxPreference) {
CheckBoxPreference checkbox = (CheckBoxPreference)usabilityStudyPref;
checkbox.setChecked(prefs.getBoolean(PREF_USABILITY_STUDY_MODE, true));
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index cabf68099..29a7e4816 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -21,7 +21,6 @@ import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardActionListener;
-import java.util.ArrayList;
import java.util.Arrays;
/**
@@ -32,9 +31,9 @@ public class WordComposer {
public static final int NOT_A_CODE = KeyDetector.NOT_A_CODE;
public static final int NOT_A_COORDINATE = -1;
- final static int N = BinaryDictionary.MAX_WORD_LENGTH;
+ private static final int N = BinaryDictionary.MAX_WORD_LENGTH;
- private ArrayList<int[]> mCodes;
+ private int[] mPrimaryKeyCodes;
private int[] mXCoordinates;
private int[] mYCoordinates;
private StringBuilder mTypedWord;
@@ -44,6 +43,7 @@ public class WordComposer {
private int mCapsCount;
private boolean mAutoCapitalized;
private int mTrailingSingleQuotesCount;
+ private int mCodePointSize;
/**
* Whether the user chose to capitalize the first char of the word.
@@ -51,12 +51,13 @@ public class WordComposer {
private boolean mIsFirstCharCapitalized;
public WordComposer() {
- mCodes = new ArrayList<int[]>(N);
+ mPrimaryKeyCodes = new int[N];
mTypedWord = new StringBuilder(N);
mXCoordinates = new int[N];
mYCoordinates = new int[N];
mAutoCorrection = null;
mTrailingSingleQuotesCount = 0;
+ refreshSize();
}
public WordComposer(WordComposer source) {
@@ -64,7 +65,7 @@ public class WordComposer {
}
public void init(WordComposer source) {
- mCodes = new ArrayList<int[]>(source.mCodes);
+ mPrimaryKeyCodes = Arrays.copyOf(source.mPrimaryKeyCodes, source.mPrimaryKeyCodes.length);
mTypedWord = new StringBuilder(source.mTypedWord);
mXCoordinates = Arrays.copyOf(source.mXCoordinates, source.mXCoordinates.length);
mYCoordinates = Arrays.copyOf(source.mYCoordinates, source.mYCoordinates.length);
@@ -72,18 +73,23 @@ public class WordComposer {
mIsFirstCharCapitalized = source.mIsFirstCharCapitalized;
mAutoCapitalized = source.mAutoCapitalized;
mTrailingSingleQuotesCount = source.mTrailingSingleQuotesCount;
+ refreshSize();
}
/**
* Clear out the keys registered so far.
*/
public void reset() {
- mCodes.clear();
mTypedWord.setLength(0);
mAutoCorrection = null;
mCapsCount = 0;
mIsFirstCharCapitalized = false;
mTrailingSingleQuotesCount = 0;
+ refreshSize();
+ }
+
+ public final void refreshSize() {
+ mCodePointSize = mTypedWord.codePointCount(0, mTypedWord.length());
}
/**
@@ -91,20 +97,15 @@ public class WordComposer {
* @return the number of keystrokes
*/
public final int size() {
- return mCodes.size();
+ return mCodePointSize;
}
public final boolean isComposingWord() {
- return mCodes.size() > 0;
+ return size() > 0;
}
- /**
- * Returns the codes at a particular position in the word.
- * @param index the position in the word
- * @return the unicode for the pressed and surrounding keys
- */
- public int[] getCodesAt(int index) {
- return mCodes.get(index);
+ public int getCodeAt(int index) {
+ return mPrimaryKeyCodes[index];
}
public int[] getXCoordinates() {
@@ -149,9 +150,10 @@ public class WordComposer {
* @param codes the array of unicode values
*/
private void add(int primaryCode, int[] codes, int keyX, int keyY) {
- final int newIndex = mCodes.size();
+ final int newIndex = size();
mTypedWord.appendCodePoint(primaryCode);
- mCodes.add(codes);
+ refreshSize();
+ mPrimaryKeyCodes[newIndex] = codes[0];
if (newIndex < BinaryDictionary.MAX_WORD_LENGTH) {
mXCoordinates[newIndex] = keyX;
mYCoordinates[newIndex] = keyY;
@@ -201,9 +203,8 @@ public class WordComposer {
* Delete the last keystroke as a result of hitting backspace.
*/
public void deleteLast() {
- final int size = mCodes.size();
+ final int size = size();
if (size > 0) {
- mCodes.remove(size - 1);
// Note: mTypedWord.length() and mCodes.length differ when there are surrogate pairs
final int stringBuilderLength = mTypedWord.length();
if (stringBuilderLength < size) {
@@ -217,9 +218,10 @@ public class WordComposer {
mTypedWord.deleteCharAt(stringBuilderLength - 1);
}
if (Character.isUpperCase(lastChar)) mCapsCount--;
+ refreshSize();
}
// We may have deleted the last one.
- if (0 == mCodes.size()) {
+ if (0 == size()) {
mIsFirstCharCapitalized = false;
}
if (mTrailingSingleQuotesCount > 0) {
@@ -307,29 +309,31 @@ public class WordComposer {
// Note: currently, we come here whenever we commit a word. If it's a MANUAL_PICK
// or a DECIDED_WORD we may cancel the commit later; otherwise, we should deactivate
// the last composed word to ensure this does not happen.
- final ArrayList<int[]> codes = mCodes;
+ final int[] primaryKeyCodes = mPrimaryKeyCodes;
final int[] xCoordinates = mXCoordinates;
final int[] yCoordinates = mYCoordinates;
- mCodes = new ArrayList<int[]>(N);
+ mPrimaryKeyCodes = new int[N];
mXCoordinates = new int[N];
mYCoordinates = new int[N];
- final LastComposedWord lastComposedWord = new LastComposedWord(codes,
+ final LastComposedWord lastComposedWord = new LastComposedWord(primaryKeyCodes,
xCoordinates, yCoordinates, mTypedWord.toString(), committedWord, separatorCode);
if (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD
&& type != LastComposedWord.COMMIT_TYPE_MANUAL_PICK) {
lastComposedWord.deactivate();
}
mTypedWord.setLength(0);
+ refreshSize();
mAutoCorrection = null;
return lastComposedWord;
}
public void resumeSuggestionOnLastComposedWord(final LastComposedWord lastComposedWord) {
- mCodes = lastComposedWord.mCodes;
+ mPrimaryKeyCodes = lastComposedWord.mPrimaryKeyCodes;
mXCoordinates = lastComposedWord.mXCoordinates;
mYCoordinates = lastComposedWord.mYCoordinates;
mTypedWord.setLength(0);
mTypedWord.append(lastComposedWord.mTypedWord);
+ refreshSize();
mAutoCorrection = null; // This will be filled by the next call to updateSuggestion.
}
}
diff --git a/java/src/com/android/inputmethod/latin/define/ProductionFlag.java b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java
new file mode 100644
index 000000000..cfb1d09cc
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.inputmethod.latin.define;
+
+public class ProductionFlag {
+ public static final boolean IS_EXPERIMENTAL = false;
+}
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index cd34ba832..5a173857e 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -353,6 +353,11 @@ public class AndroidSpellCheckerService extends SpellCheckerService
@Override
public boolean onUnbind(final Intent intent) {
+ closeAllDictionaries();
+ return false;
+ }
+
+ private void closeAllDictionaries() {
final Map<String, DictionaryPool> oldPools = mDictionaryPools;
mDictionaryPools = Collections.synchronizedMap(new TreeMap<String, DictionaryPool>());
final Map<String, Dictionary> oldUserDictionaries = mUserDictionaries;
@@ -378,7 +383,6 @@ public class AndroidSpellCheckerService extends SpellCheckerService
dictToClose.close();
}
}
- return false;
}
private DictionaryPool getDictionaryPool(final String locale) {