Add Armenian Phoetic keyboard

We believe this layout is Armenian Eastern Phonetic Keyboard.

Bug: 7963631
Change-Id: Iff3dd879268dd95f00855f67f749e8562fff490c
diff --git a/java/res/xml/kbd_armenian_phonetic.xml b/java/res/xml/kbd_armenian_phonetic.xml
new file mode 100644
index 0000000..1eb3c7e
--- /dev/null
+++ b/java/res/xml/kbd_armenian_phonetic.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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"
+    latin:rowHeight="20%p"
+    latin:verticalGap="@fraction/key_bottom_gap_5row"
+    latin:keyLetterSize="@fraction/key_letter_ratio_5row"
+    latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row"
+    latin:touchPositionCorrectionData="@array/touch_position_correction_data_default"
+>
+    <include
+        latin:keyboardLayout="@xml/rows_armenian_phonetic" />
+</Keyboard>
diff --git a/java/res/xml/key_armenian_sha.xml b/java/res/xml/key_armenian_sha.xml
new file mode 100644
index 0000000..3865c19
--- /dev/null
+++ b/java/res/xml/key_armenian_sha.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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+0577: "շ" ARMENIAN SMALL LETTER SHA -->
+    <Key
+        latin:keyLabel="&#x0577;"
+        latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml/key_armenian_xeh.xml b/java/res/xml/key_armenian_xeh.xml
new file mode 100644
index 0000000..007a580
--- /dev/null
+++ b/java/res/xml/key_armenian_xeh.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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+056D: "խ" ARMENIAN SMALL LETTER XEH -->
+    <Key
+        latin:keyLabel="&#x056D;"
+        latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml/keyboard_layout_set_armenian_phonetic.xml b/java/res/xml/keyboard_layout_set_armenian_phonetic.xml
new file mode 100644
index 0000000..b374fae
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_armenian_phonetic.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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.
+*/
+-->
+
+<KeyboardLayoutSet
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <Element
+        latin:elementName="alphabet"
+        latin:elementKeyboard="@xml/kbd_armenian_phonetic"
+        latin:enableProximityCharsCorrection="true" />
+    <Element
+        latin:elementName="symbols"
+        latin:elementKeyboard="@xml/kbd_symbols" />
+    <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" />
+</KeyboardLayoutSet>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index aee5253..c3d68c6 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -47,6 +47,7 @@
     hi: Hindi/hindi
     hr: Croatian/qwertz
     hu: Hungarian/qwertz
+    hy: Armenian Phonetic/armenian_phonetic
     in: Indonesian/qwerty    # "id" is official language code of Indonesian.
     is: Icelandic/qwerty
     it: Italian/qwerty
@@ -269,6 +270,13 @@
             android:imeSubtypeMode="keyboard"
             android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection"
     />
+    <subtype android:icon="@drawable/ic_subtype_keyboard"
+            android:label="@string/subtype_generic"
+            android:subtypeId="0xe39ac3ca"
+            android:imeSubtypeLocale="hy"
+            android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=armenian_phonetic"
+    />
     <!-- Java uses the deprecated "in" code instead of the standard "id" code for Indonesian. -->
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
diff --git a/java/res/xml/rowkeys_armenian_phonetic1.xml b/java/res/xml/rowkeys_armenian_phonetic1.xml
new file mode 100644
index 0000000..1984fae
--- /dev/null
+++ b/java/res/xml/rowkeys_armenian_phonetic1.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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+0567: "է" ARMENIAN SMALL LETTER EH -->
+    <Key
+        latin:keyLabel="&#x0567;"
+        latin:keyHintLabel="1"
+        latin:additionalMoreKeys="1"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0569: "թ" ARMENIAN SMALL LETTER TO -->
+    <Key
+        latin:keyLabel="&#x0569;"
+        latin:keyHintLabel="2"
+        latin:additionalMoreKeys="2"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0583: "փ" ARMENIAN SMALL LETTER PIWR -->
+    <Key
+        latin:keyLabel="&#x0583;"
+        latin:keyHintLabel="3"
+        latin:additionalMoreKeys="3"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0571: "ձ" ARMENIAN SMALL LETTER JA -->
+    <Key
+        latin:keyLabel="&#x0571;"
+        latin:keyHintLabel="4"
+        latin:additionalMoreKeys="4"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+057B: "ջ" ARMENIAN SMALL LETTER JHEH -->
+    <Key
+        latin:keyLabel="&#x057B;"
+        latin:keyHintLabel="5"
+        latin:additionalMoreKeys="5"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0580: "ր" ARMENIAN SMALL LETTER REH -->
+    <Key
+        latin:keyLabel="&#x0580;"
+        latin:keyHintLabel="6"
+        latin:additionalMoreKeys="6"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0579: "չ" ARMENIAN SMALL LETTER CHA -->
+    <Key
+        latin:keyLabel="&#x0579;"
+        latin:keyHintLabel="7"
+        latin:additionalMoreKeys="7"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0573: "ճ" ARMENIAN SMALL LETTER CHEH -->
+    <Key
+        latin:keyLabel="&#x0573;"
+        latin:keyHintLabel="8"
+        latin:additionalMoreKeys="8"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+056A: "ժ" ARMENIAN SMALL LETTER ZHE -->
+    <Key
+        latin:keyLabel="&#x056A;"
+        latin:keyHintLabel="9"
+        latin:additionalMoreKeys="9"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+056E: "ծ" ARMENIAN SMALL LETTER CA -->
+    <Key
+        latin:keyLabel="&#x056E;"
+        latin:keyHintLabel="0"
+        latin:additionalMoreKeys="0"
+        latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml/rowkeys_armenian_phonetic2.xml b/java/res/xml/rowkeys_armenian_phonetic2.xml
new file mode 100644
index 0000000..5dcabc3
--- /dev/null
+++ b/java/res/xml/rowkeys_armenian_phonetic2.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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+0584: "ք" ARMENIAN SMALL LETTER KEH -->
+    <Key
+        latin:keyLabel="&#x0584;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0578: "ո" ARMENIAN SMALL LETTER VO -->
+    <Key
+        latin:keyLabel="&#x0578;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0565: "ե" ARMENIAN SMALL LETTER ECH
+         U+0587: "և" ARMENIAN SMALL LIGATURE ECH YIWN -->
+    <Key
+        latin:keyLabel="&#x0565;"
+        latin:moreKeys="&#x0587;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+057C: "ռ" ARMENIAN SMALL LETTER RA -->
+    <Key
+        latin:keyLabel="&#x057C;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+057F: "տ" ARMENIAN SMALL LETTER TIWN -->
+    <Key
+        latin:keyLabel="&#x057F;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0568: "ը" ARMENIAN SMALL LETTER ET -->
+    <Key
+        latin:keyLabel="&#x0568;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0582: "ւ" ARMENIAN SMALL LETTER YIWN -->
+    <Key
+        latin:keyLabel="&#x0582;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+056B: "ի" ARMENIAN SMALL LETTER INI -->
+    <Key
+        latin:keyLabel="&#x056B;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0585: "օ" ARMENIAN SMALL LETTER OH -->
+    <Key
+        latin:keyLabel="&#x0585;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+057A: "պ" ARMENIAN SMALL LETTER PEH -->
+    <Key
+        latin:keyLabel="&#x057A;"
+        latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml/rowkeys_armenian_phonetic3.xml b/java/res/xml/rowkeys_armenian_phonetic3.xml
new file mode 100644
index 0000000..3116811
--- /dev/null
+++ b/java/res/xml/rowkeys_armenian_phonetic3.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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+0561: "ա" ARMENIAN SMALL LETTER AYB -->
+    <Key
+        latin:keyLabel="&#x0561;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+057D: "ս" ARMENIAN SMALL LETTER SEH -->
+    <Key
+        latin:keyLabel="&#x057D;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0564: "դ" ARMENIAN SMALL LETTER DA -->
+    <Key
+        latin:keyLabel="&#x0564;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0586: "ֆ" ARMENIAN SMALL LETTER FEH -->
+    <Key
+        latin:keyLabel="&#x0586;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0563: "գ" ARMENIAN SMALL LETTER GIM -->
+    <Key
+        latin:keyLabel="&#x0563;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0570: "հ" ARMENIAN SMALL LETTER HO -->
+    <Key
+        latin:keyLabel="&#x0570;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0575: "յ" ARMENIAN SMALL LETTER YI -->
+    <Key
+        latin:keyLabel="&#x0575;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+056F: "կ" ARMENIAN SMALL LETTER KEN -->
+    <Key
+        latin:keyLabel="&#x056F;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+056C: "լ" ARMENIAN SMALL LETTER LIWN -->
+    <Key
+        latin:keyLabel="&#x056C;"
+        latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml/rowkeys_armenian_phonetic4.xml b/java/res/xml/rowkeys_armenian_phonetic4.xml
new file mode 100644
index 0000000..922481a
--- /dev/null
+++ b/java/res/xml/rowkeys_armenian_phonetic4.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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+0566: "զ" ARMENIAN SMALL LETTER ZA -->
+    <Key
+        latin:keyLabel="&#x0566;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0572: "ղ" ARMENIAN SMALL LETTER GHAD -->
+    <Key
+        latin:keyLabel="&#x0572;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0581: "ց" ARMENIAN SMALL LETTER CO -->
+    <Key
+        latin:keyLabel="&#x0581;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+057E: "վ" ARMENIAN SMALL LETTER VEW -->
+    <Key
+        latin:keyLabel="&#x057E;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0562: "բ" ARMENIAN SMALL LETTER BEN -->
+    <Key
+        latin:keyLabel="&#x0562;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0576: "ն" ARMENIAN SMALL LETTER NOW -->
+    <Key
+        latin:keyLabel="&#x0576;"
+        latin:keyLabelFlags="fontNormal" />
+    <!-- U+0574: "մ" ARMENIAN SMALL LETTER MEN -->
+    <Key
+        latin:keyLabel="&#x0574;"
+        latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml/rows_armenian_phonetic.xml b/java/res/xml/rows_armenian_phonetic.xml
new file mode 100644
index 0000000..282dd41
--- /dev/null
+++ b/java/res/xml/rows_armenian_phonetic.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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.0%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_armenian_phonetic1" />
+    </Row>
+    <Row
+        latin:keyWidth="10.0%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_armenian_phonetic2" />
+    </Row>
+    <Row
+        latin:keyWidth="10.0%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_armenian_phonetic3" />
+        <include
+            latin:keyboardLayout="@xml/key_armenian_xeh" />
+    </Row>
+    <Row
+        latin:keyWidth="9.8000%p"
+    >
+        <Key
+            latin:keyStyle="shiftKeyStyle"
+            latin:keyWidth="10.8%p" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_armenian_phonetic4" />
+        <include
+            latin:keyboardLayout="@xml/key_armenian_sha" />
+        <Key
+            latin:keyStyle="deleteKeyStyle"
+            latin:keyWidth="fillRight" />
+    </Row>
+    <include
+        latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>