diff options
author | linyuh <linyuh@google.com> | 2017-11-03 11:57:28 -0700 |
---|---|---|
committer | zachh <zachh@google.com> | 2017-11-11 06:38:42 +0000 |
commit | 1fe02f5e572970e21b760d5774483bc859634982 (patch) | |
tree | 3a695e7ed49c2b5771009ff656f195f956435028 /java | |
parent | 82670fee34bfc922905f31d3904406eb0677b162 (diff) |
Add character mappings for Bulgarian & Ukrainian in DialpadCharMappings.
Bug: 30215380
Test: Manual
PiperOrigin-RevId: 174493347
Change-Id: I06d5d3d8877ac29d148b3945e28dc0a094660eca
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/dialpadview/DialpadCharMappings.java | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/java/com/android/dialer/dialpadview/DialpadCharMappings.java b/java/com/android/dialer/dialpadview/DialpadCharMappings.java index 12994bc78..03bc2e728 100644 --- a/java/com/android/dialer/dialpadview/DialpadCharMappings.java +++ b/java/com/android/dialer/dialpadview/DialpadCharMappings.java @@ -50,13 +50,34 @@ public class DialpadCharMappings { getCharToKeyMap(KEY_TO_CHARS); } + /** The character mapping for the Bulgarian alphabet */ + private static class Bul { + private static final String[] KEY_TO_CHARS = { + "" /* 0 */, + "" /* 1 */, + "АБВГ" /* 2 */, + "ДЕЖЗ" /* 3 */, + "ИЙКЛ" /* 4 */, + "МНО" /* 5 */, + "ПРС" /* 6 */, + "ТУФХ" /* 7 */, + "ЦЧШЩ" /* 8 */, + "ЪЬЮЯ" /* 9 */, + "" /* * */, + "" /* # */, + }; + + private static final SimpleArrayMap<Character, Character> CHAR_TO_KEY = + getCharToKeyMap(KEY_TO_CHARS); + } + /** The character mapping for the Russian alphabet */ private static class Rus { private static final String[] KEY_TO_CHARS = { "" /* 0 */, "" /* 1 */, "АБВГ" /* 2 */, - "ДЕЖЗ" /* 3 */, + "ДЕЁЖЗ" /* 3 */, "ИЙКЛ" /* 4 */, "МНОП" /* 5 */, "РСТУ" /* 6 */, @@ -71,6 +92,27 @@ public class DialpadCharMappings { getCharToKeyMap(KEY_TO_CHARS); } + /** The character mapping for the Ukrainian alphabet */ + private static class Ukr { + private static final String[] KEY_TO_CHARS = { + "" /* 0 */, + "" /* 1 */, + "АБВГҐ" /* 2 */, + "ДЕЄЖЗ" /* 3 */, + "ИІЇЙКЛ" /* 4 */, + "МНОП" /* 5 */, + "РСТУ" /* 6 */, + "ФХЦЧ" /* 7 */, + "ШЩ" /* 8 */, + "ЬЮЯ" /* 9 */, + "" /* * */, + "" /* # */, + }; + + private static final SimpleArrayMap<Character, Character> CHAR_TO_KEY = + getCharToKeyMap(KEY_TO_CHARS); + } + // A map in which each key is an ISO 639-2 language code and the corresponding value is a // character-key map. private static final SimpleArrayMap<String, SimpleArrayMap<Character, Character>> @@ -81,8 +123,13 @@ public class DialpadCharMappings { private static final SimpleArrayMap<String, String[]> KEY_TO_CHAR_MAPS = new SimpleArrayMap<>(); static { + CHAR_TO_KEY_MAPS.put("bul", Bul.CHAR_TO_KEY); CHAR_TO_KEY_MAPS.put("rus", Rus.CHAR_TO_KEY); + CHAR_TO_KEY_MAPS.put("ukr", Ukr.CHAR_TO_KEY); + + KEY_TO_CHAR_MAPS.put("bul", Bul.KEY_TO_CHARS); KEY_TO_CHAR_MAPS.put("rus", Rus.KEY_TO_CHARS); + KEY_TO_CHAR_MAPS.put("ukr", Ukr.KEY_TO_CHARS); } /** |