am 174da5c3: Merge "Disable the Burmese keyboard."

* commit '174da5c39541dab78a9d82904f90c28a4c4be436':
  Disable the Burmese keyboard.
main
Dan Zivkovic 2015-01-29 18:30:20 +00:00 committed by Android Git Automerger
commit 7eb388c737
18 changed files with 4 additions and 1475 deletions

View File

@ -556,7 +556,7 @@
<enum name="lao" value="10" />
<enum name="latin" value="11" />
<enum name="malayalam" value="12" />
<enum name="myanmar" value="13" />
<!-- Myanmar is disabled. <enum name="myanmar" value="13" /> -->
<enum name="sinhala" value="14" />
<enum name="tamil" value="15" />
<enum name="telugu" value="16" />

View File

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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="9.0%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_myanmar1" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
latin:keyWidth="9.0%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_myanmar2" />
</Row>
<Row
latin:keyWidth="9.0%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_myanmar3" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
latin:keyWidth="9.0%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="10.0%p" />
<include latin:keyboardLayout="@xml/rowkeys_myanmar4" />
<include latin:keyboardLayout="@xml/keys_exclamation_question" />
</Row>
<include latin:keyboardLayout="@xml/row_qwerty4" />
</merge>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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/config_key_vertical_gap_5row"
latin:keyLetterSize="@fraction/config_key_letter_ratio_5row"
latin:keyShiftedLetterHintRatio="@fraction/config_key_shifted_letter_hint_ratio_5row"
latin:touchPositionCorrectionData="@array/touch_position_correction_data_default"
>
<include
latin:keyboardLayout="@xml/rows_myanmar" />
</Keyboard>

View File

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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">
<Feature
latin:supportedScript="myanmar" />
<Element
latin:elementName="alphabet"
latin:elementKeyboard="@xml/kbd_myanmar"
latin:enableProximityCharsCorrection="true" />
<Element
latin:elementName="alphabetAutomaticShifted"
latin:elementKeyboard="@xml/kbd_myanmar"
latin:enableProximityCharsCorrection="true" />
<!-- On these shifted alphabet layouts the proximity characters correction should be disabled
because the letters on these layouts aren't the ones in different case of the above
unshifted layouts. -->
<Element
latin:elementName="alphabetManualShifted"
latin:elementKeyboard="@xml/kbd_myanmar" />
<Element
latin:elementName="alphabetShiftLocked"
latin:elementKeyboard="@xml/kbd_myanmar" />
<Element
latin:elementName="alphabetShiftLockShifted"
latin:elementKeyboard="@xml/kbd_myanmar" />
<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" />
</KeyboardLayoutSet>

View File

@ -75,7 +75,6 @@
mn_MN: Mongolian (Mongolia)/mongolian
mr_IN: Marathi (India)/marathi
ms_MY: Malay (Malaysia)/qwerty
my_MM: Myanmar (Myanmar)/myanmar # This is a preliminary keyboard layout.
nb: Norwegian Bokmål/nordic
ne_NP: Nepali (Nepal) Romanized/nepali_romanized
ne_NP: Nepali (Nepal) Traditional/nepali_traditional
@ -545,16 +544,6 @@
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
android:isAsciiCapable="true"
/>
<!-- TODO: This Myanmar keyboard is a preliminary layout.
This isn't based on the final specification. -->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0xea266ea4"
android:imeSubtypeLocale="my_MM"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=myanmar,EmojiCapable,CombiningRules=MyanmarReordering"
android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x3f12ee14"

View File

@ -1,105 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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">
<switch>
<case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted">
<!-- U+1027: "ဧ" MYANMAR LETTER E -->
<Key latin:keySpec="&#x1027;" />
<!-- U+104F: "၏" MYANMAR SYMBOL GENITIVE -->
<Key latin:keySpec="&#x104F;" />
<!-- U+1024: "ဤ" MYANMAR LETTER II -->
<Key latin:keySpec="&#x1024;" />
<!-- U+1023: "ဣ" MYANMAR LETTER I -->
<Key latin:keySpec="&#x1023;" />
<!-- U+104E: "၎" MYANMAR SYMBOL AFOREMENTIONED -->
<Key latin:keySpec="&#x104E;" />
<!-- U+1000/U+103B/U+1015/U+103A: "ကျပ်"
MYANMAR LETTER KA/MYANMAR CONSONANT SIGN MEDIAL YA/MYANMAR LETTER PA/MYANMAR SIGN ASAT -->
<Key
latin:keySpec="&#x1000;&#x103B;&#x1015;&#x103A;"
latin:keyLabelFlags="followKeyLetterRatio|autoScale" />
<!-- U+1029: "ဩ" MYANMAR LETTER O -->
<Key
latin:keySpec="&#x1029;"
latin:keyLabelFlags="autoScale" />
<!-- U+102A: "ဪ" MYANMAR LETTER AU -->
<Key
latin:keySpec="&#x102A;"
latin:keyLabelFlags="autoScale" />
<!-- U+104D: "၍" MYANMAR SYMBOL COMPLETED -->
<Key latin:keySpec="&#x104D;" />
<!-- U+104C: "၌" MYANMAR SYMBOL LOCATIVE -->
<Key latin:keySpec="&#x104C;" />
</case>
<default>
<!-- U+1041: "၁" MYANMAR DIGIT ONE -->
<Key
latin:keySpec="&#x1041;"
latin:keyHintLabel="1"
latin:additionalMoreKeys="1" />
<!-- U+1042: "၂" MYANMAR DIGIT TWO -->
<Key
latin:keySpec="&#x1042;"
latin:keyHintLabel="2"
latin:additionalMoreKeys="2" />
<!-- U+1043: "၃" MYANMAR DIGIT THREE -->
<Key
latin:keySpec="&#x1043;"
latin:keyHintLabel="3"
latin:additionalMoreKeys="3" />
<!-- U+1044: "၄" MYANMAR DIGIT FOUR -->
<Key
latin:keySpec="&#x1044;"
latin:keyHintLabel="4"
latin:additionalMoreKeys="4" />
<!-- U+1045: "၅" MYANMAR DIGIT FIVE -->
<Key
latin:keySpec="&#x1045;"
latin:keyHintLabel="5"
latin:additionalMoreKeys="5" />
<!-- U+1046: "၆" MYANMAR DIGIT SIX -->
<Key
latin:keySpec="&#x1046;"
latin:keyHintLabel="6"
latin:additionalMoreKeys="6" />
<!-- U+1047: "၇" MYANMAR DIGIT SEVEN -->
<Key
latin:keySpec="&#x1047;"
latin:keyHintLabel="7"
latin:additionalMoreKeys="7" />
<!-- U+1048: "၈" MYANMAR DIGIT EIGHT -->
<Key
latin:keySpec="&#x1048;"
latin:keyHintLabel="8"
latin:additionalMoreKeys="8" />
<!-- U+1049: "၉" MYANMAR DIGIT NINE -->
<Key
latin:keySpec="&#x1049;"
latin:keyHintLabel="9"
latin:additionalMoreKeys="9" />
<!-- U+1040: "" MYANMAR DIGIT ZERO -->
<Key
latin:keySpec="&#x1040;"
latin:keyHintLabel="0"
latin:additionalMoreKeys="0" />
</default>
</switch>
</merge>

View File

@ -1,104 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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">
<switch>
<case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted">
<!-- U+1017: "ဗ" MYANMAR LETTER BA
U+1039/U+1017: "္ဗ" MYANMAR SIGN VIRAMA/MYANMAR LETTER BA -->
<Key
latin:keySpec="&#x1017;"
latin:moreKeys="&#x1039;&#x1017;" />
<!-- U+1012: "ဒ" MYANMAR LETTER DA
U+1039/U+1012: "္ဒ" MYANMAR SIGN VIRAMA/MYANMAR LETTER DA -->
<Key
latin:keySpec="&#x1012;"
latin:moreKeys="&#x1039;&#x1012;" />
<!-- U+1013: "ဓ" MYANMAR LETTER DHA
U+1039/U+1013: "္ဓ" MYANMAR SIGN VIRAMA/MYANMAR LETTER DHA -->
<Key
latin:keySpec="&#x1013;"
latin:moreKeys="&#x1039;&#x1013;" />
<!-- U+1003: "ဃ" MYANMAR LETTER GHA -->
<Key latin:keySpec="&#x1003;" />
<!-- U+100E: "ဎ" MYANMAR LETTER DDHA -->
<Key latin:keySpec="&#x100E;" />
<!-- U+103F: "ဿ" MYANMAR LETTER GREAT SA -->
<Key latin:keySpec="&#x103F;" />
<!-- U+100F: "ဏ" MYANMAR LETTER NNA -->
<Key latin:keySpec="&#x100F;" />
<!-- U+1008: "ဈ" MYANMAR LETTER JHA
U+1039/U+1008: "္ဈ" MYANMAR SIGN VIRAMA/MYANMAR LETTER JHA -->
<Key
latin:keySpec="&#x1008;"
latin:moreKeys="&#x1039;&#x1008;" />
<!-- U+1007: "ဇ" MYANMAR LETTER JA
U+1039/U+1007: "္ဇ" MYANMAR SIGN VIRAMA/MYANMAR LETTER JA -->
<Key
latin:keySpec="&#x1007;"
latin:moreKeys="&#x1039;&#x1007;" />
<!-- U+1002: "ဂ" MYANMAR LETTER GA
U+1039/U+1002: "္ဂ" MYANMAR SIGN VIRAMA/MYANMAR LETTER GA -->
<Key
latin:keySpec="&#x1002;"
latin:moreKeys="&#x1039;&#x1002;" />
</case>
<default>
<!-- U+1006: "ဆ" MYANMAR LETTER CHA
U+1039/U+1006: "္ဆ" MYANMAR SIGN VIRAMA/MYANMAR LETTER CHA -->
<Key
latin:keySpec="&#x1006;"
latin:moreKeys="&#x1039;&#x1006;" />
<!-- U+1010: "တ" MYANMAR LETTER TA
U+1039/U+1010: "္တ" MYANMAR SIGN VIRAMA/MYANMAR LETTER TA -->
<Key
latin:keySpec="&#x1010;"
latin:moreKeys="&#x1039;&#x1010;" />
<!-- U+1014: "န" MYANMAR LETTER NA
U+1039/U+1014: "္န" MYANMAR SIGN VIRAMA/MYANMAR LETTER NA -->
<Key
latin:keySpec="&#x1014;"
latin:moreKeys="&#x1039;&#x1014;" />
<!-- U+1019: "မ" MYANMAR LETTER MA
U+1039/U+1019: "္မ" MYANMAR SIGN VIRAMA/MYANMAR LETTER MA -->
<Key
latin:keySpec="&#x1019;"
latin:moreKeys="&#x1039;&#x1019;" />
<!-- U+1021: "အ" MYANMAR LETTER A -->
<Key latin:keySpec="&#x1021;" />
<!-- U+1015: "ပ" MYANMAR LETTER PA -->
<Key latin:keySpec="&#x1015;" />
<!-- U+1000: "က" MYANMAR LETTER KA
U+1039/U+1000: "္က" MYANMAR SIGN VIRAMA/MYANMAR LETTER KA -->
<Key
latin:keySpec="&#x1000;"
latin:moreKeys="&#x1039;&#x1000;" />
<!-- U+1004: "င" MYANMAR LETTER NGA -->
<Key latin:keySpec="&#x1004;" />
<!-- U+101E: "သ" MYANMAR LETTER SA -->
<Key latin:keySpec="&#x101E;" />
<!-- U+1005: "စ" MYANMAR LETTER CA
U+1039/U+1005: "္စ" MYANMAR SIGN VIRAMA/MYANMAR LETTER CA -->
<Key
latin:keySpec="&#x1005;"
latin:moreKeys="&#x1039;&#x1005;" />
</default>
</switch>
</merge>

View File

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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">
<switch>
<case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted">
<!-- U+101A: "ယ" MYANMAR LETTER YA -->
<Key latin:keySpec="&#x101A;" />
<!-- U+1039: "္" MYANMAR SIGN VIRAMA -->
<Key latin:keySpec="&#x1039;" />
<!-- U+1004/U+103A/U+1039: "င်္င" MYANMAR LETTER NGA/MYANMAR SIGN ASAT/MYANMAR SIGN VIRAMA -->
<Key
latin:keySpec="&#x1004;&#x103A;&#x1039;"
latin:keyLabelFlags="followKeyLetterRatio" />
<!-- U+103E: "ှ" MYANMAR CONSONANT SIGN MEDIAL HA -->
<Key latin:keySpec="&#x103E;" />
<!-- U+102E: "ီ" MYANMAR VOWEL SIGN II -->
<Key latin:keySpec="&#x102E;" />
<!-- U+1030: "ူ" MYANMAR VOWEL SIGN UU -->
<Key latin:keySpec="&#x1030;" />
<!-- U+102B: "ါ" MYANMAR VOWEL SIGN TALL AA -->
<Key latin:keySpec="&#x102B;" />
<!-- U+1032: "ဲ" MYANMAR VOWEL SIGN AI -->
<Key latin:keySpec="&#x1032;" />
<!-- U+1036: "ံ" MYANMAR SIGN ANUSVARA -->
<Key latin:keySpec="&#x1036;" />
<!-- U+101F: "ဟ" MYANMAR LETTER HA -->
<Key latin:keySpec="&#x101F;" />
</case>
<default>
<!-- U+1031: "ေ" MYANMAR VOWEL SIGN E -->
<Key latin:keySpec="&#x1031;" />
<!-- U+103B: "ျ" MYANMAR CONSONANT SIGN MEDIAL YA -->
<Key latin:keySpec="&#x103B;" />
<!-- U+103C: "ြ" MYANMAR CONSONANT SIGN MEDIAL RA -->
<Key latin:keySpec="&#x103C;" />
<!-- U+103D: "ွ" MYANMAR CONSONANT SIGN MEDIAL WA
U+103E: "ှ" MYANMAR CONSONANT SIGN MEDIAL HA
U+103D/U+103E: "ွှ" MYANMAR CONSONANT SIGN MEDIAL WA/MYANMAR CONSONANT SIGN MEDIAL HA -->
<Key
latin:keySpec="&#x103D;"
latin:moreKeys="&#x103E;,&#x103D;&#x103E;" />
<!-- U+102D: "ိ" MYANMAR VOWEL SIGN I
U+102E: "ီ" MYANMAR VOWEL SIGN II -->
<Key
latin:keySpec="&#x102D;"
latin:moreKeys="&#x102E;" />
<!-- U+102F: "ု" MYANMAR VOWEL SIGN U
U+1030: "ူ" MYANMAR VOWEL SIGN UU -->
<Key
latin:keySpec="&#x102F;"
latin:moreKeys="&#x1030;" />
<!-- U+102C: "ာ" MYANMAR VOWEL SIGN AA
U+102B: "ါ" MYANMAR VOWEL SIGN TALL AA -->
<Key
latin:keySpec="&#x102C;"
latin:moreKeys="&#x102B;" />
<!-- U+103A: "်" MYANMAR SIGN ASAT
U+1032: "ဲ" MYANMAR VOWEL SIGN AI -->
<Key
latin:keySpec="&#x103A;"
latin:moreKeys="&#x1032;" />
<!-- U+1037: "့" MYANMAR SIGN DOT BELOW
U+1036: "ံ" MYANMAR SIGN ANUSVARA -->
<Key
latin:keySpec="&#x1037;"
latin:moreKeys="&#x1036;" />
<!-- U+1038: "း" MYANMAR SIGN VISARGA -->
<Key latin:keySpec="&#x1038;" />
</default>
</switch>
</merge>

View File

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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">
<switch>
<case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted">
<!-- U+1025: "ဥ" MYANMAR LETTER U -->
<Key latin:keySpec="&#x1025;" />
<!-- U+1026: "ဦ" MYANMAR LETTER UU -->
<Key latin:keySpec="&#x1026;" />
<!-- U+100C: "ဌ" MYANMAR LETTER TTHA -->
<Key latin:keySpec="&#x100C;" />
<!-- U+100B: "ဋ" MYANMAR LETTER TTA -->
<Key latin:keySpec="&#x100B;" />
<!-- U+100D: "ဍ" MYANMAR LETTER DDA -->
<Key latin:keySpec="&#x100D;" />
<!-- U+1020: "ဠ" MYANMAR LETTER LLA -->
<Key latin:keySpec="&#x1020;" />
<!-- U+100B/U+1039/U+100C: "ဋ္ဌ" MYANMAR LETTER TTA/MYANMAR SIGN VIRAMA/MYANMAR LETTER TTHA -->
<Key
latin:keySpec="&#x100B;&#x1039;&#x100C;"
latin:keyLabelFlags="followKeyLetterRatio" />
<!-- U+100F/U+1039/U+100D: "ဏ္ဍ" MYANMAR LETTER NNA/MYANMAR SIGN VIRAMA/MYANMAR LETTER DDA
U+100F/U+1039/U+100C: "ဏ္ဌ" MYANMAR LETTER NNA/MYANMAR SIGN VIRAMA/MYANMAR LETTER TTHA -->
<Key
latin:keySpec="&#x100F;&#x1039;&#x100D;"
latin:moreKeys="&#x100F;&#x1039;&#x100C;"
latin:keyLabelFlags="followKeyLetterRatio" />
</case>
<default>
<!-- U+1016: "ဖ" MYANMAR LETTER PHA -->
<Key latin:keySpec="&#x1016;" />
<!-- U+1011: "ထ" MYANMAR LETTER THA
U+1039/U+1011: "္ထ" MYANMAR SIGN VIRAMA/MYANMAR LETTER THA -->
<Key
latin:keySpec="&#x1011;"
latin:moreKeys="&#x1039;&#x1011;" />
<!-- U+1001: "ခ" MYANMAR LETTER KHA
U+1039/U+1001: "္ခ" MYANMAR SIGN VIRAMA/MYANMAR LETTER KHA -->
<Key
latin:keySpec="&#x1001;"
latin:moreKeys="&#x1039;&#x1001;" />
<!-- U+101C: "လ" MYANMAR LETTER LA
U+1039/U+101C: "္လ" MYANMAR SIGN VIRAMA/MYANMAR LETTER LA -->
<Key
latin:keySpec="&#x101C;"
latin:moreKeys="&#x1039;&#x101C;" />
<!-- U+1018: "ဘ" MYANMAR LETTER BHA
U+1039/U+1018: "္ဘ" MYANMAR SIGN VIRAMA/MYANMAR LETTER BHA -->
<Key
latin:keySpec="&#x1018;"
latin:moreKeys="&#x1039;&#x1018;" />
<!-- U+100A: "ည" MYANMAR LETTER NNYA
U+1009: "ဉ" MYANMAR LETTER NYA -->
<Key
latin:keySpec="&#x100A;"
latin:moreKeys="&#x1009;" />
<!-- U+101B: "ရ" MYANMAR LETTER RA -->
<Key latin:keySpec="&#x101B;" />
<!-- U+101D: "" MYANMAR LETTER WA -->
<Key latin:keySpec="&#x101D;" />
</default>
</switch>
</merge>

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_myanmar1" />
</Row>
<Row
latin:keyWidth="10.0%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_myanmar2" />
</Row>
<Row
latin:keyWidth="10.0%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_myanmar3" />
</Row>
<Row
latin:keyWidth="10.0%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<Key latin:keyStyle="shiftKeyStyle" />
<include latin:keyboardLayout="@xml/rowkeys_myanmar4" />
<Key latin:keyStyle="deleteKeyStyle" />
</Row>
<include latin:keyboardLayout="@xml/row_qwerty4" />
</merge>

View File

@ -22,7 +22,6 @@ import android.text.TextUtils;
import com.android.inputmethod.latin.common.Constants;
import java.util.ArrayList;
import java.util.HashMap;
import javax.annotation.Nonnull;
@ -45,13 +44,6 @@ public class CombinerChain {
private SpannableStringBuilder mStateFeedback;
private final ArrayList<Combiner> mCombiners;
private static final HashMap<String, Class<? extends Combiner>> IMPLEMENTED_COMBINERS =
new HashMap<>();
static {
IMPLEMENTED_COMBINERS.put("MyanmarReordering", MyanmarReordering.class);
}
private static final String COMBINER_SPEC_SEPARATOR = ";";
/**
* Create an combiner chain.
*
@ -61,15 +53,11 @@ public class CombinerChain {
* cursor: we'll start after this.
*
* @param initialText The text that has already been combined so far.
* @param combinerList A list of combiners to be applied in order.
*/
public CombinerChain(final String initialText, final Combiner... combinerList) {
public CombinerChain(final String initialText) {
mCombiners = new ArrayList<>();
// The dead key combiner is always active, and always first
mCombiners.add(new DeadKeyCombiner());
for (final Combiner combiner : combinerList) {
mCombiners.add(combiner);
}
mCombinedText = new StringBuilder(initialText);
mStateFeedback = new SpannableStringBuilder();
}
@ -146,30 +134,4 @@ public class CombinerChain {
final SpannableStringBuilder s = new SpannableStringBuilder(mCombinedText);
return s.append(mStateFeedback);
}
public static Combiner[] createCombiners(final String spec) {
if (TextUtils.isEmpty(spec)) {
return new Combiner[0];
}
final String[] combinerDescriptors = spec.split(COMBINER_SPEC_SEPARATOR);
final Combiner[] combiners = new Combiner[combinerDescriptors.length];
int i = 0;
for (final String combinerDescriptor : combinerDescriptors) {
final Class<? extends Combiner> combinerClass =
IMPLEMENTED_COMBINERS.get(combinerDescriptor);
if (null == combinerClass) {
throw new RuntimeException("Unknown combiner descriptor: " + combinerDescriptor);
}
try {
combiners[i++] = combinerClass.newInstance();
} catch (InstantiationException e) {
throw new RuntimeException("Unable to instantiate combiner: " + combinerDescriptor,
e);
} catch (IllegalAccessException e) {
throw new RuntimeException("Unable to instantiate combiner: " + combinerDescriptor,
e);
}
}
return combiners;
}
}

View File

@ -1,265 +0,0 @@
/*
* Copyright (C) 2014 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.event;
import com.android.inputmethod.latin.common.Constants;
import java.util.ArrayList;
import java.util.Arrays;
import javax.annotation.Nonnull;
/**
* A combiner that reorders input for Myanmar.
*/
public class MyanmarReordering implements Combiner {
// U+1031 MYANMAR VOWEL SIGN E
private final static int VOWEL_E = 0x1031; // Code point for vowel E that we need to reorder
// U+200C ZERO WIDTH NON-JOINER
// U+200B ZERO WIDTH SPACE
private final static int ZERO_WIDTH_NON_JOINER = 0x200B; // should be 0x200C
private final ArrayList<Event> mCurrentEvents = new ArrayList<>();
// List of consonants :
// U+1000 MYANMAR LETTER KA
// U+1001 MYANMAR LETTER KHA
// U+1002 MYANMAR LETTER GA
// U+1003 MYANMAR LETTER GHA
// U+1004 MYANMAR LETTER NGA
// U+1005 MYANMAR LETTER CA
// U+1006 MYANMAR LETTER CHA
// U+1007 MYANMAR LETTER JA
// U+1008 MYANMAR LETTER JHA
// U+1009 MYANMAR LETTER NYA
// U+100A MYANMAR LETTER NNYA
// U+100B MYANMAR LETTER TTA
// U+100C MYANMAR LETTER TTHA
// U+100D MYANMAR LETTER DDA
// U+100E MYANMAR LETTER DDHA
// U+100F MYANMAR LETTER NNA
// U+1010 MYANMAR LETTER TA
// U+1011 MYANMAR LETTER THA
// U+1012 MYANMAR LETTER DA
// U+1013 MYANMAR LETTER DHA
// U+1014 MYANMAR LETTER NA
// U+1015 MYANMAR LETTER PA
// U+1016 MYANMAR LETTER PHA
// U+1017 MYANMAR LETTER BA
// U+1018 MYANMAR LETTER BHA
// U+1019 MYANMAR LETTER MA
// U+101A MYANMAR LETTER YA
// U+101B MYANMAR LETTER RA
// U+101C MYANMAR LETTER LA
// U+101D MYANMAR LETTER WA
// U+101E MYANMAR LETTER SA
// U+101F MYANMAR LETTER HA
// U+1020 MYANMAR LETTER LLA
// U+103F MYANMAR LETTER GREAT SA
private static boolean isConsonant(final int codePoint) {
return (codePoint >= 0x1000 && codePoint <= 0x1020) || 0x103F == codePoint;
}
// List of medials :
// U+103B MYANMAR CONSONANT SIGN MEDIAL YA
// U+103C MYANMAR CONSONANT SIGN MEDIAL RA
// U+103D MYANMAR CONSONANT SIGN MEDIAL WA
// U+103E MYANMAR CONSONANT SIGN MEDIAL HA
// U+105E MYANMAR CONSONANT SIGN MON MEDIAL NA
// U+105F MYANMAR CONSONANT SIGN MON MEDIAL MA
// U+1060 MYANMAR CONSONANT SIGN MON MEDIAL LA
// U+1082 MYANMAR CONSONANT SIGN SHAN MEDIAL WA
private static int[] MEDIAL_LIST = { 0x103B, 0x103C, 0x103D, 0x103E,
0x105E, 0x105F, 0x1060, 0x1082};
private static boolean isMedial(final int codePoint) {
return Arrays.binarySearch(MEDIAL_LIST, codePoint) >= 0;
}
private static boolean isConsonantOrMedial(final int codePoint) {
return isConsonant(codePoint) || isMedial(codePoint);
}
private Event getLastEvent() {
final int size = mCurrentEvents.size();
if (size <= 0) {
return null;
}
return mCurrentEvents.get(size - 1);
}
private CharSequence getCharSequence() {
final StringBuilder s = new StringBuilder();
for (final Event e : mCurrentEvents) {
s.appendCodePoint(e.mCodePoint);
}
return s;
}
/**
* Clears the currently combining stream of events and returns the resulting software text
* event corresponding to the stream. Optionally adds a new event to the cleared stream.
* @param newEvent the new event to add to the stream. null if none.
* @return the resulting software text event. Never null.
*/
@Nonnull
private Event clearAndGetResultingEvent(final Event newEvent) {
final CharSequence combinedText;
if (mCurrentEvents.size() > 0) {
combinedText = getCharSequence();
mCurrentEvents.clear();
} else {
combinedText = null;
}
if (null != newEvent) {
mCurrentEvents.add(newEvent);
}
return null == combinedText ? Event.createConsumedEvent(newEvent)
: Event.createSoftwareTextEvent(combinedText, Event.NOT_A_KEY_CODE);
}
@Override
@Nonnull
public Event processEvent(ArrayList<Event> previousEvents, Event newEvent) {
final int codePoint = newEvent.mCodePoint;
if (VOWEL_E == codePoint) {
final Event lastEvent = getLastEvent();
if (null == lastEvent) {
mCurrentEvents.add(newEvent);
return Event.createConsumedEvent(newEvent);
}
if (isConsonantOrMedial(lastEvent.mCodePoint)) {
final Event resultingEvent = clearAndGetResultingEvent(null);
mCurrentEvents.add(Event.createSoftwareKeypressEvent(ZERO_WIDTH_NON_JOINER,
Event.NOT_A_KEY_CODE,
Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE,
false /* isKeyRepeat */));
mCurrentEvents.add(newEvent);
return resultingEvent;
}
// VOWEL_E == lastCodePoint. But if that was anything else this is correct too.
return clearAndGetResultingEvent(newEvent);
}
if (isConsonant(codePoint)) {
final Event lastEvent = getLastEvent();
if (null == lastEvent) {
mCurrentEvents.add(newEvent);
return Event.createConsumedEvent(newEvent);
}
if (VOWEL_E == lastEvent.mCodePoint) {
final int eventSize = mCurrentEvents.size();
if (eventSize >= 2
&& mCurrentEvents.get(eventSize - 2).mCodePoint == ZERO_WIDTH_NON_JOINER) {
// We have a ZWJN before a vowel E. We need to remove the ZWNJ and then
// reorder the vowel with respect to the consonant.
mCurrentEvents.remove(eventSize - 1);
mCurrentEvents.remove(eventSize - 2);
mCurrentEvents.add(newEvent);
mCurrentEvents.add(lastEvent);
return Event.createConsumedEvent(newEvent);
}
// If there is already a consonant, then we are starting a new syllable.
for (int i = eventSize - 2; i >= 0; --i) {
if (isConsonant(mCurrentEvents.get(i).mCodePoint)) {
return clearAndGetResultingEvent(newEvent);
}
}
// If we come here, we didn't have a consonant so we reorder
mCurrentEvents.remove(eventSize - 1);
mCurrentEvents.add(newEvent);
mCurrentEvents.add(lastEvent);
return Event.createConsumedEvent(newEvent);
}
// lastCodePoint is a consonant/medial. But if it's something else it's fine
return clearAndGetResultingEvent(newEvent);
}
if (isMedial(codePoint)) {
final Event lastEvent = getLastEvent();
if (null == lastEvent) {
mCurrentEvents.add(newEvent);
return Event.createConsumedEvent(newEvent);
}
if (VOWEL_E == lastEvent.mCodePoint) {
final int eventSize = mCurrentEvents.size();
// If there is already a consonant, then we are in the middle of a syllable, and we
// need to reorder.
boolean hasConsonant = false;
for (int i = eventSize - 2; i >= 0; --i) {
if (isConsonant(mCurrentEvents.get(i).mCodePoint)) {
hasConsonant = true;
break;
}
}
if (hasConsonant) {
mCurrentEvents.remove(eventSize - 1);
mCurrentEvents.add(newEvent);
mCurrentEvents.add(lastEvent);
return Event.createConsumedEvent(newEvent);
}
// Otherwise, we just commit everything.
return clearAndGetResultingEvent(null);
}
// lastCodePoint is a consonant/medial. But if it's something else it's fine
return clearAndGetResultingEvent(newEvent);
}
final Event lastEvent = getLastEvent();
if (Constants.CODE_DELETE == newEvent.mKeyCode && null != lastEvent) {
final int eventSize = mCurrentEvents.size();
if (VOWEL_E == lastEvent.mCodePoint) {
// We have a VOWEL_E at the end. There are four cases.
// - The vowel is the only code point in the buffer. Remove it.
// - The vowel is preceded by a ZWNJ. Remove both vowel E and ZWNJ.
// - The vowel is preceded by a consonant/medial, remove the consonant/medial.
// - In all other cases, it's strange, so just remove the last code point.
if (eventSize <= 1) {
mCurrentEvents.clear();
} else { // eventSize >= 2
final int previousCodePoint = mCurrentEvents.get(eventSize - 2).mCodePoint;
if (previousCodePoint == ZERO_WIDTH_NON_JOINER) {
mCurrentEvents.remove(eventSize - 1);
mCurrentEvents.remove(eventSize - 2);
} else if (isConsonantOrMedial(previousCodePoint)) {
mCurrentEvents.remove(eventSize - 2);
} else {
mCurrentEvents.remove(eventSize - 1);
}
}
return Event.createConsumedEvent(newEvent);
} else if (eventSize > 0) {
mCurrentEvents.remove(eventSize - 1);
return Event.createConsumedEvent(newEvent);
}
}
// This character is not part of the combining scheme, so we should reset everything.
if (mCurrentEvents.size() > 0) {
// If we have events in flight, then add the new event and return the resulting event.
mCurrentEvents.add(newEvent);
return clearAndGetResultingEvent(null);
}
// If we don't have any events in flight, then just pass this one through.
return newEvent;
}
@Override
public CharSequence getCombiningStateFeedback() {
return getCharSequence();
}
@Override
public void reset() {
mCurrentEvents.clear();
}
}

View File

@ -2781,41 +2781,6 @@ public final class KeyboardTextsTable {
/* additional_morekeys_symbols_0 */ "0",
};
/* Locale my_MM: Burmese (Myanmar) */
private static final String[] TEXTS_my_MM = {
/* morekeys_a ~ */
null, null, null, null,
/* ~ morekeys_u */
// Label for "switch to alphabetic" key.
// U+1000: "က" MYANMAR LETTER KA
// U+1001: "ခ" MYANMAR LETTER KHA
// U+1002: "ဂ" MYANMAR LETTER GA
/* keylabel_to_alpha */ "\u1000\u1001\u1002",
/* morekeys_i ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null,
/* ~ morekeys_nordic_row2_11 */
/* morekeys_punctuation */ "!autoColumnOrder!9,\u104A,.,?,!,#,),(,/,;,...,',@,:,-,\",+,\\%,&",
// U+104A: "၊" MYANMAR SIGN LITTLE SECTION
// U+104B: "။" MYANMAR SIGN SECTION
/* keyspec_tablet_comma */ "\u104A",
/* keyspec_period */ "\u104B",
/* morekeys_period */ null,
/* keyspec_tablet_period */ "\u104B",
/* keyspec_swiss_row1_11 ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null,
/* ~ keyspec_comma */
/* morekeys_tablet_comma */ "\\,",
/* keyhintlabel_period */ "\u104A",
/* morekeys_question ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null,
/* ~ keyspec_south_slavic_row3_8 */
/* morekeys_tablet_punctuation */ "!autoColumnOrder!8,.,',#,),(,/,;,@,...,:,-,\",+,\\%,&",
};
/* Locale nb: Norwegian Bokmål */
private static final String[] TEXTS_nb = {
// U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
@ -4189,7 +4154,6 @@ public final class KeyboardTextsTable {
"ml_IN" , TEXTS_ml_IN, /* 2/ 12 Malayalam (India) */
"mn_MN" , TEXTS_mn_MN, /* 2/ 12 Mongolian (Mongolia) */
"mr_IN" , TEXTS_mr_IN, /* 23/ 53 Marathi (India) */
"my_MM" , TEXTS_my_MM, /* 8/ 98 Burmese (Myanmar) */
"nb" , TEXTS_nb, /* 11/ 55 Norwegian Bokmål */
"ne_NP" , TEXTS_ne_NP, /* 27/ 60 Nepali (Nepal) */
"nl" , TEXTS_nl, /* 9/ 13 Dutch */

View File

@ -103,8 +103,7 @@ public final class WordComposer {
final String nonNullCombiningSpec = null == combiningSpec ? "" : combiningSpec;
if (!nonNullCombiningSpec.equals(mCombiningSpec)) {
mCombinerChain = new CombinerChain(
mCombinerChain.getComposingWordWithCombiningFeedback().toString(),
CombinerChain.createCombiners(nonNullCombiningSpec));
mCombinerChain.getComposingWordWithCombiningFeedback().toString());
mCombiningSpec = nonNullCombiningSpec;
}
}

View File

@ -1,271 +0,0 @@
/*
* Copyright (C) 2014 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.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.common.Constants;
import java.util.Locale;
/**
* The Myanmar alphabet keyboard.
*/
public final class Myanmar extends LayoutBase {
private static final String LAYOUT_NAME = "myanmar";
public Myanmar(final Locale locale) {
super(new MyanmarCustomizer(locale), Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
private static class MyanmarCustomizer extends LayoutCustomizer {
MyanmarCustomizer(final Locale locale) { super(locale); }
@Override
public int getNumberOfRows() { return 5; }
@Override
public ExpectedKey getAlphabetKey() { return MYANMAR_ALPHABET_KEY; }
@Override
public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
}
@Override
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
// U+002C: "," COMMA
// U+104A: "၊" MYANMAR SIGN LITTLE SECTION
return isPhone ? joinKeys(key("\u002C", SETTINGS_KEY))
: joinKeys(key("\u104A", moreKey(","), SETTINGS_KEY));
}
@Override
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
// U+104B: "။" MYANMAR SIGN SECTION
final ExpectedKey periodKey = key("\u104B", getPunctuationMoreKeys(isPhone));
return joinKeys(periodKey);
}
@Override
public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
return isPhone ? MYANMAR_PHONE_PUNCTUATION_MORE_KEYS
: MYANMAR_TABLET_PUNCTUATION_MORE_KEYS;
}
// U+1000: "က" MYANMAR LETTER KA
// U+1001: "ခ" MYANMAR LETTER KHA
// U+1002: "ဂ" MYANMAR LETTER GA
private static final ExpectedKey MYANMAR_ALPHABET_KEY = key(
"\u1000\u1001\u1002", Constants.CODE_SWITCH_ALPHA_SYMBOL);
// U+104A: "၊" MYANMAR SIGN LITTLE SECTION
// Punctuation more keys for phone form factor.
private static final ExpectedKey[] MYANMAR_PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
"\u104A", ".", "?", "!", "#", ")", "(", "/", ";",
"...", "'", "@", ":", "-", "\"", "+", "%", "&");
// Punctuation more keys for tablet form factor.
private static final ExpectedKey[] MYANMAR_TABLET_PUNCTUATION_MORE_KEYS = joinKeys(
".", "'", "#", ")", "(", "/", ";", "@",
"...", ":", "-", "\"", "+", "%", "&");
}
@Override
ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; }
@Override
public ExpectedKey[][] getCommonAlphabetShiftLayout(final boolean isPhone,
final int elementId) {
if (elementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
return getCommonAlphabetLayout(isPhone);
}
return ALPHABET_SHIFTED_COMMON;
}
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
// U+1041: "၁" MYANMAR DIGIT ONE
key("\u1041", moreKey("1")),
// U+1042: "၂" MYANMAR DIGIT TWO
key("\u1042", moreKey("2")),
// U+1043: "၃" MYANMAR DIGIT THREE
key("\u1043", moreKey("3")),
// U+1044: "၄" MYANMAR DIGIT FOUR
key("\u1044", moreKey("4")),
// U+1045: "၅" MYANMAR DIGIT FIVE
key("\u1045", moreKey("5")),
// U+1046: "၆" MYANMAR DIGIT SIX
key("\u1046", moreKey("6")),
// U+1047: "၇" MYANMAR DIGIT SEVEN
key("\u1047", moreKey("7")),
// U+1048: "၈" MYANMAR DIGIT EIGHT
key("\u1048", moreKey("8")),
// U+1049: "၉" MYANMAR DIGIT NINE
key("\u1049", moreKey("9")),
// U+1040: "" MYANMAR DIGIT ZERO
key("\u1040", moreKey("0")))
.setKeysOfRow(2,
// U+1006: "ဆ" MYANMAR LETTER CHA
// U+1039/U+1006: "္ဆ" MYANMAR SIGN VIRAMA/MYANMAR LETTER CHA
key("\u1006", moreKey("\u1039\u1006")),
// U+1010: "တ" MYANMAR LETTER TA
// U+1039/U+1010: "္တ" MYANMAR SIGN VIRAMA/MYANMAR LETTER TA
key("\u1010", moreKey("\u1039\u1010")),
// U+1014: "န" MYANMAR LETTER NA
// U+1039/U+1014: "္န" MYANMAR SIGN VIRAMA/MYANMAR LETTER NA
key("\u1014", moreKey("\u1039\u1014")),
// U+1019: "မ" MYANMAR LETTER MA
// U+1039/U+1019: "္မ" MYANMAR SIGN VIRAMA/MYANMAR LETTER MA
key("\u1019", moreKey("\u1039\u1019")),
// U+1021: "အ" MYANMAR LETTER A
// U+1015: "ပ" MYANMAR LETTER PA
"\u1021", "\u1015",
// U+1000: "က" MYANMAR LETTER KA
// U+1039/U+1000: "္က" MYANMAR SIGN VIRAMA/MYANMAR LETTER KA
key("\u1000", moreKey("\u1039\u1000")),
// U+1004: "င" MYANMAR LETTER NGA
// U+101E: "သ" MYANMAR LETTER SA
"\u1004", "\u101E",
// U+1005: "စ" MYANMAR LETTER CA
// U+1039/U+1005: "္စ" MYANMAR SIGN VIRAMA/MYANMAR LETTER CA
key("\u1005", moreKey("\u1039\u1005")))
.setKeysOfRow(3,
// U+1031: "ေ" MYANMAR VOWEL SIGN E
// U+103B: "ျ" MYANMAR CONSONANT SIGN MEDIAL YA
// U+103C: "ြ" MYANMAR CONSONANT SIGN MEDIAL RA
"\u1031", "\u103B", "\u103C",
// U+103D: "ွ" MYANMAR CONSONANT SIGN MEDIAL WA
// U+103E: "ှ" MYANMAR CONSONANT SIGN MEDIAL HA
// U+103D/U+103E:
// "ွှ" MYANMAR CONSONANT SIGN MEDIAL WA/MYANMAR CONSONANT SIGN MEDIAL HA
key("\u103D", joinMoreKeys("\u103E", "\u103D\u103E")),
// U+102D: "ိ" MYANMAR VOWEL SIGN I
// U+102E: "ီ" MYANMAR VOWEL SIGN II
key("\u102D", moreKey("\u102E")),
// U+102F: "ု" MYANMAR VOWEL SIGN U
// U+1030: "ူ" MYANMAR VOWEL SIGN UU
key("\u102F", moreKey("\u1030")),
// U+102C: "ာ" MYANMAR VOWEL SIGN AA
// U+102B: "ါ" MYANMAR VOWEL SIGN TALL AA
key("\u102C", moreKey("\u102B")),
// U+103A: "်" MYANMAR SIGN ASAT
// U+1032: "ဲ" MYANMAR VOWEL SIGN AI
key("\u103A", moreKey("\u1032")),
// U+1037: "့" MYANMAR SIGN DOT BELOW
// U+1036: "ံ" MYANMAR SIGN ANUSVARA
key("\u1037", moreKey("\u1036")),
// U+1038: "း" MYANMAR SIGN VISARGA
"\u1038")
.setKeysOfRow(4,
// U+1016: "ဖ" MYANMAR LETTER PHA
"\u1016",
// U+1011: "ထ" MYANMAR LETTER THA
// U+1039/U+1011: "္ထ" MYANMAR SIGN VIRAMA/MYANMAR LETTER THA
key("\u1011", moreKey("\u1039\u1011")),
// U+1001: "ခ" MYANMAR LETTER KHA
// U+1039/U+1001: "္ခ" MYANMAR SIGN VIRAMA/MYANMAR LETTER KHA
key("\u1001", moreKey("\u1039\u1001")),
// U+101C: "လ" MYANMAR LETTER LA
// U+1039/U+101C: "္လ" MYANMAR SIGN VIRAMA/MYANMAR LETTER LA
key("\u101C", moreKey("\u1039\u101C")),
// U+1018: "ဘ" MYANMAR LETTER BHA
// U+1039/U+1018: "္ဘ" MYANMAR SIGN VIRAMA/MYANMAR LETTER BHA
key("\u1018", moreKey("\u1039\u1018")),
// U+100A: "ည" MYANMAR LETTER NNYA
// U+1009: "ဉ" MYANMAR LETTER NYA
key("\u100A", moreKey("\u1009")),
// U+101B: "ရ" MYANMAR LETTER RA
// U+101D: "" MYANMAR LETTER WA
"\u101B", "\u101D")
.build();
private static final ExpectedKey[][] ALPHABET_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
// U+1027: "ဧ" MYANMAR LETTER E
// U+104F: "၏" MYANMAR SYMBOL GENITIVE
// U+1024: "ဤ" MYANMAR LETTER II
// U+1023: "ဣ" MYANMAR LETTER I
// U+104E: "၎" MYANMAR SYMBOL AFOREMENTIONED
// U+1000/U+103B/U+1015/U+103A: "ကျပ်" MYANMAR LETTER KA
// /MYANMAR CONSONANT SIGN MEDIAL YA/MYANMAR LETTER PA/MYANMAR SIGN ASAT
// U+1029: "ဩ" MYANMAR LETTER O
// U+102A: "ဪ" MYANMAR LETTER AU
// U+104D: "၍" MYANMAR SYMBOL COMPLETED
// U+104C: "၌" MYANMAR SYMBOL LOCATIVE
"\u1027", "\u104F", "\u1024", "\u1023", "\u104E", "\u1000\u103B\u1015\u103A",
"\u1029", "\u102A", "\u104D", "\u104C")
.setKeysOfRow(2,
// U+1017: "ဗ" MYANMAR LETTER BA
// U+1039/U+1017: "္ဗ" MYANMAR SIGN VIRAMA/MYANMAR LETTER BA
key("\u1017", moreKey("\u1039\u1017")),
// U+1012: "ဒ" MYANMAR LETTER DA
// U+1039/U+1012: "္ဒ" MYANMAR SIGN VIRAMA/MYANMAR LETTER DA
key("\u1012", moreKey("\u1039\u1012")),
// U+1013: "ဓ" MYANMAR LETTER DHA
// U+1039/U+1013: "္ဓ" MYANMAR SIGN VIRAMA/MYANMAR LETTER DHA
key("\u1013", moreKey("\u1039\u1013")),
// U+1003: "ဃ" MYANMAR LETTER GHA
// U+100E: "ဎ" MYANMAR LETTER DDHA
// U+103F: "ဿ" MYANMAR LETTER GREAT SA
// U+100F: "ဏ" MYANMAR LETTER NNA
"\u1003", "\u100E", "\u103F", "\u100F",
// U+1008: "ဈ" MYANMAR LETTER JHA
// U+1039/U+1008: "္ဈ" MYANMAR SIGN VIRAMA/MYANMAR LETTER JHA
key("\u1008", moreKey("\u1039\u1008")),
// U+1007: "ဇ" MYANMAR LETTER JA
// U+1039/U+1007: "္ဇ" MYANMAR SIGN VIRAMA/MYANMAR LETTER JA
key("\u1007", moreKey("\u1039\u1007")),
// U+1002: "ဂ" MYANMAR LETTER GA
// U+1039/U+1002: "္ဂ" MYANMAR SIGN VIRAMA/MYANMAR LETTER GA
key("\u1002", moreKey("\u1039\u1002")))
.setKeysOfRow(3,
// U+101A: "ယ" MYANMAR LETTER YA
// U+1039: "္" MYANMAR SIGN VIRAMA
// U+1004/U+103A/U+1039: "င်္င" MYANMAR LETTER NGA
// /MYANMAR SIGN ASAT/MYANMAR SIGN VIRAMA
// U+103E: "ှ" MYANMAR CONSONANT SIGN MEDIAL HA
// U+102E: "ီ" MYANMAR VOWEL SIGN II
// U+1030: "ူ" MYANMAR VOWEL SIGN UU
// U+102B: "ါ" MYANMAR VOWEL SIGN TALL AA
// U+1032: "ဲ" MYANMAR VOWEL SIGN AI
// U+1036: "ံ" MYANMAR SIGN ANUSVARA
// U+101F: "ဟ" MYANMAR LETTER HA
"\u101A", "\u1039", "\u1004\u103A\u1039", "\u103E", "\u102E", "\u1030",
"\u102B", "\u1032", "\u1036", "\u101F")
.setKeysOfRow(4,
// U+1025: "ဥ" MYANMAR LETTER U
// U+1026: "ဦ" MYANMAR LETTER UU
// U+100C: "ဌ" MYANMAR LETTER TTHA
// U+100B: "ဋ" MYANMAR LETTER TTA
// U+100D: "ဍ" MYANMAR LETTER DDA
// U+1020: "ဠ" MYANMAR LETTER LLA
// U+100B/U+1039/U+100C: "ဋ္ဌ" MYANMAR LETTER TTA
// /MYANMAR SIGN VIRAMA/MYANMAR LETTER TTHA
"\u1025", "\u1026", "\u100C", "\u100B", "\u100D", "\u1020",
"\u100B\u1039\u100C",
// U+100F/U+1039/U+100D: "ဏ္ဍ" MYANMAR LETTER NNA
// /MYANMAR SIGN VIRAMA/MYANMAR LETTER DDA
// U+100F/U+1039/U+100C: "ဏ္ဌ" MYANMAR LETTER NNA
// /MYANMAR SIGN VIRAMA/MYANMAR LETTER TTHA
key("\u100F\u1039\u100D", moreKey("\u100F\u1039\u100C")))
.build();
}

View File

@ -27,7 +27,7 @@ import java.util.ArrayList;
@SmallTest
public class KeyboardLayoutSetSubtypesCountTests extends KeyboardLayoutSetTestsBase {
private static final int NUMBER_OF_SUBTYPES = 85;
private static final int NUMBER_OF_SUBTYPES = 84;
private static final int NUMBER_OF_ASCII_CAPABLE_SUBTYPES = 50;
private static final int NUMBER_OF_PREDEFINED_ADDITIONAL_SUBTYPES = 2;

View File

@ -1,36 +0,0 @@
/*
* Copyright (C) 2014 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.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Myanmar;
import java.util.Locale;
/**
* my_MM: Myanmar (Myanmar)/myanmar
*/
@SmallTest
public final class TestsMyanmarMM extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("my", "MM");
private static final LayoutBase LAYOUT = new Myanmar(LOCALE);
@Override
LayoutBase getLayout() { return LAYOUT; }
}

View File

@ -1,235 +0,0 @@
/*
* 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;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.Suppress;
import android.util.Pair;
/*
* Relevant characters for this test :
* Spurs the need to reorder :
* U+1031 MYANMAR VOWEL SIGN E :
* U+1004 U+103A U+1039 Kinzi. It's a compound character.
*
* List of consonants :
* U+1000 MYANMAR LETTER KA က
* U+1001 MYANMAR LETTER KHA
* U+1002 MYANMAR LETTER GA
* U+1003 MYANMAR LETTER GHA
* U+1004 MYANMAR LETTER NGA
* U+1005 MYANMAR LETTER CA
* U+1006 MYANMAR LETTER CHA
* U+1007 MYANMAR LETTER JA
* U+1008 MYANMAR LETTER JHA
* U+1009 MYANMAR LETTER NYA
* U+100A MYANMAR LETTER NNYA
* U+100B MYANMAR LETTER TTA
* U+100C MYANMAR LETTER TTHA
* U+100D MYANMAR LETTER DDA
* U+100E MYANMAR LETTER DDHA
* U+100F MYANMAR LETTER NNA
* U+1010 MYANMAR LETTER TA
* U+1011 MYANMAR LETTER THA
* U+1012 MYANMAR LETTER DA
* U+1013 MYANMAR LETTER DHA
* U+1014 MYANMAR LETTER NA
* U+1015 MYANMAR LETTER PA
* U+1016 MYANMAR LETTER PHA
* U+1017 MYANMAR LETTER BA
* U+1018 MYANMAR LETTER BHA
* U+1019 MYANMAR LETTER MA
* U+101A MYANMAR LETTER YA
* U+101B MYANMAR LETTER RA
* U+101C MYANMAR LETTER LA
* U+101D MYANMAR LETTER WA
* U+101E MYANMAR LETTER SA
* U+101F MYANMAR LETTER HA
* U+1020 MYANMAR LETTER LLA
* U+103F MYANMAR LETTER GREAT SA
*
* List of medials :
* U+103B MYANMAR CONSONANT SIGN MEDIAL YA
* U+103C MYANMAR CONSONANT SIGN MEDIAL RA
* U+103D MYANMAR CONSONANT SIGN MEDIAL WA
* U+103E MYANMAR CONSONANT SIGN MEDIAL HA
* U+105E MYANMAR CONSONANT SIGN MON MEDIAL NA
* U+105F MYANMAR CONSONANT SIGN MON MEDIAL MA
* U+1060 MYANMAR CONSONANT SIGN MON MEDIAL LA
* U+1082 MYANMAR CONSONANT SIGN SHAN MEDIAL WA
*
* Other relevant characters :
* U+200C ZERO WIDTH NON-JOINER
* U+200B ZERO WIDTH SPACE
*/
@LargeTest
// These tests are inactive until the combining code for Myanmar Reordering is sorted out.
@Suppress
public class InputLogicTestsReorderingMyanmar extends InputTestsBase {
// The tests are formatted as follows.
// Each test is an entry in the array of Pair arrays.
// One test is an array of pairs. Each pair contains, in the `first' member,
// the code points that the next key press should contain. In the `second'
// member is stored the string that should be in the text view after this
// key press.
private static final Pair<?, ?>[][] TESTS = {
// Tests for U+1031 MYANMAR VOWEL SIGN E : ေ
new Pair[] { // Type : U+1031 U+1000 U+101F ေ က ဟ
Pair.create(new int[] { 0x1031 }, "\u1031"), // ေ
Pair.create(new int[] { 0x1000 }, "\u1000\u1031"), // ကေ
Pair.create(new int[] { 0x101F }, "\u1000\u1031\u101F") // ကေဟ
},
new Pair[] { // Type : U+1000 U+1031 U+101F က ေ ဟ
Pair.create(new int[] { 0x1000 }, "\u1000"), // က
Pair.create(new int[] { 0x1031 }, "\u1000\u200B\u1031"), // က‌ေ
Pair.create(new int[] { 0x101F }, "\u1000\u101F\u1031") // ကဟေ
},
new Pair[] { // Type : U+1031 U+101D U+103E U+1018 ေ ှ ဘ
Pair.create(new int[] { 0x1031 }, "\u1031"), // ေ
Pair.create(new int[] { 0x101D }, "\u101D\u1031"), // ဝေ
Pair.create(new int[] { 0x103E }, "\u101D\u103E\u1031"), // ဝှေ
Pair.create(new int[] { 0x1018 }, "\u101D\u103E\u1031\u1018") // ဝှေဘ
},
new Pair[] { // Type : U+1031 U+1014 U+1031 U+1000 U+102C U+1004 U+103A U+1038 U+101C
// U+102C U+1038 U+104B ေ န ေ က ာ င ် း လ ာ း ။
Pair.create(new int[] { 0x1031 }, "\u1031"), // ေ
Pair.create(new int[] { 0x1014 }, "\u1014\u1031"), // နေ
Pair.create(new int[] { 0x1031 }, "\u1014\u1031\u1031"), // နေ‌ေ
Pair.create(new int[] { 0x1000 }, "\u1014\u1031\u1000\u1031"), // နေကေ
Pair.create(new int[] { 0x102C }, "\u1014\u1031\u1000\u1031\u102C"), // နေကော
Pair.create(new int[] { 0x1004 }, "\u1014\u1031\u1000\u1031\u102C\u1004"), // နေကောင
Pair.create(new int[] { 0x103A }, // နေကောင်
"\u1014\u1031\u1000\u1031\u102C\u1004\u103A"),
Pair.create(new int[] { 0x1038 }, // နေကောင်း
"\u1014\u1031\u1000\u1031\u102C\u1004\u103A\u1038"),
Pair.create(new int[] { 0x101C }, // နေကောင်းလ
"\u1014\u1031\u1000\u1031\u102C\u1004\u103A\u1038\u101C"),
Pair.create(new int[] { 0x102C }, // နေကောင်းလာ
"\u1014\u1031\u1000\u1031\u102C\u1004\u103A\u1038\u101C\u102C"),
Pair.create(new int[] { 0x1038 }, // နေကောင်းလား
"\u1014\u1031\u1000\u1031\u102C\u1004\u103A\u1038\u101C\u102C\u1038"),
Pair.create(new int[] { 0x104B }, // နေကောင်းလား။
"\u1014\u1031\u1000\u1031\u102C\u1004\u103A\u1038\u101C\u102C\u1038\u104B")
},
new Pair[] { // Type : U+1031 U+1031 U+1031 U+1000 ေ ေ ေ က
Pair.create(new int[] { 0x1031 }, "\u1031"), // ေ
Pair.create(new int[] { 0x1031 }, "\u1031\u1031"), // ေေ
Pair.create(new int[] { 0x1031 }, "\u1031\u1031\u1031"), // U+1031ေေေ
Pair.create(new int[] { 0x1000 }, "\u1031\u1031\u1000\u1031") // ေေကေ
},
new Pair[] { // Type : U+1031 U+1001 U+103B U+103D U+1038 ေ ခ ျ ွ း
Pair.create(new int[] { 0x1031 }, "\u1031"), // ေ
Pair.create(new int[] { 0x1001 }, "\u1001\u1031"), // ခေ
Pair.create(new int[] { 0x103B }, "\u1001\u103B\u1031"), // ချေ
Pair.create(new int[] { 0x103D }, "\u1001\u103B\u103D\u1031"), // ချွေ
Pair.create(new int[] { 0x1038 }, "\u1001\u103B\u103D\u1031\u1038") // ချွေး
},
// Tests for Kinzi U+1004 U+103A U+1039 :
/* Kinzi reordering is not implemented yet. Uncomment these tests when it is.
new Pair[] { // Type : U+1021 U+1002 (U+1004 U+103A U+1039)
// U+101C U+1014 U+103A အ ဂ (င ် ္) လ န ်
Pair.create(new int[] { 0x1021 }, "\u1021"), // အ
Pair.create(new int[] { 0x1002 }, "\u1021\u1002"), // အဂ
Pair.create(new int[] { 0x1004, 0x103A, 0x1039 }, // အင်္ဂ
"\u1021\u1004\u103A\u1039\u1002"),
Pair.create(new int[] { 0x101C }, // အင်္ဂလ
"\u1021\u1004\u103A\u1039\u1002\u101C"),
Pair.create(new int[] { 0x1014 }, // အင်္ဂလန
"\u1021\u1004\u103A\u1039\u1002\u101C\u1014"),
Pair.create(new int[] { 0x103A }, // အင်္ဂလန်
"\u1021\u1004\u103A\u1039\u1002\u101C\u1014\u103A")
},
new Pair[] { //Type : kinzi after a whole syllable U+101E U+1001 U+103B U+102D U+102F
// (U+1004 U+103A U+1039) U+1004 U+103A U+1038 သ ခ ျ ိ ု င ် ္ င ် း
Pair.create(new int[] { 0x101E }, "\u101E"), // သခ
Pair.create(new int[] { 0x1001 }, "\u101E\u1001"), // သခ
Pair.create(new int[] { 0x103B }, "\u101E\u1001\u103B"), // သချ
Pair.create(new int[] { 0x102D }, "\u101E\u1001\u103B\u102D"), // သချိ
Pair.create(new int[] { 0x102F }, "\u101E\u1001\u103B\u102D\u102F"), // သချို
Pair.create(new int[] { 0x1004, 0x103A, 0x1039}, // သင်္ချို
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D\u102F"),
Pair.create(new int[] { 0x1004 }, // သင်္ချိုင
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D\u102F\u1004"),
Pair.create(new int[] { 0x103A }, // သင်္ချိုင်
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D\u102F\u1004\u103A"),
Pair.create(new int[] { 0x1038 }, // သင်္ချိုင်း
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D\u102F\u1004\u103A\u1038")
},
new Pair[] { // Type : kinzi after the consonant U+101E U+1001 (U+1004 U+103A U+1039)
// U+103B U+102D U+102F U+1004 U+103A U+1038 သ ခ င ် ္ ျ ိ ု င ် း
Pair.create(new int[] { 0x101E }, "\u101E"), // သခ
Pair.create(new int[] { 0x1001 }, "\u101E\u1001"), // သခ
Pair.create(new int[] { 0x1004, 0x103A, 0x1039 }, // သင်္ခ
"\u101E\u1004\u103A\u1039\u1001"),
Pair.create(new int[] { 0x103B }, // သင်္ချ
"\u101E\u1004\u103A\u1039\u1001\u103B"),
Pair.create(new int[] { 0x102D }, // သင်္ချိ
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D"),
Pair.create(new int[] { 0x102F }, // သင်္ချို
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D\u102F"),
Pair.create(new int[] { 0x1004 }, // သင်္ချိုင
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D\u102F\u1004"),
Pair.create(new int[] { 0x103A }, // သင်္ချိုင်
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D\u102F\u1004\u103A"),
Pair.create(new int[] { 0x1038 }, // သင်္ချိုင်း
"\u101E\u1004\u103A\u1039\u1001\u103B\u102D\u102F\u1004\u103A\u1038")
},
*/
};
private void doMyanmarTest(final int testNumber, final Pair<?, ?>[] test) {
int stepNumber = 0;
for (final Pair<?, ?> step : test) {
++stepNumber;
final int[] input = (int[]) step.first;
final String expectedResult = (String) step.second;
if (input.length > 1) {
mLatinIME.onTextInput(new String(input, 0, input.length));
} else {
type(input[0]);
}
assertEquals("Myanmar reordering test " + testNumber + ", step " + stepNumber,
expectedResult, mEditText.getText().toString());
}
}
public void testMyanmarReordering() {
int testNumber = 0;
changeLanguage("my_MM", "CombiningRules=MyanmarReordering");
for (final Pair<?, ?>[] test : TESTS) {
// Small trick to reset LatinIME : setText("") and send updateSelection with values
// LatinIME has never seen, and cursor pos 0,0.
mEditText.setText("");
mLatinIME.onUpdateSelection(1, 1, 0, 0, -1, -1);
doMyanmarTest(++testNumber, test);
}
}
}