1 package com.android.dialer.dialpad;
2 
3 /**
4  * Note: These methods currently take characters as arguments. For future planned language support,
5  * they will need to be changed to use codepoints instead of characters.
6  *
7  * http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#codePointAt(int)
8  *
9  * If/when this change is made, LatinSmartDialMap(which operates on chars) will continue to work
10  * by simply casting from a codepoint to a character.
11  */
12 public interface SmartDialMap {
13     /*
14      * Returns true if the provided character can be mapped to a key on the dialpad
15      */
isValidDialpadCharacter(char ch)16     public boolean isValidDialpadCharacter(char ch);
17 
18     /*
19      * Returns true if the provided character is a letter, and can be mapped to a key on the dialpad
20      */
isValidDialpadAlphabeticChar(char ch)21     public boolean isValidDialpadAlphabeticChar(char ch);
22 
23     /*
24      * Returns true if the provided character is a digit, and can be mapped to a key on the dialpad
25      */
isValidDialpadNumericChar(char ch)26     public boolean isValidDialpadNumericChar(char ch);
27 
28     /*
29      * Get the index of the key on the dialpad which the character corresponds to
30      */
getDialpadIndex(char ch)31     public byte getDialpadIndex(char ch);
32 
33     /*
34      * Get the actual numeric character on the dialpad which the character corresponds to
35      */
getDialpadNumericCharacter(char ch)36     public char getDialpadNumericCharacter(char ch);
37 
38     /*
39      * Converts uppercase characters to lower case ones, and on a best effort basis, strips accents
40      * from accented characters.
41      */
normalizeCharacter(char ch)42     public char normalizeCharacter(char ch);
43 }
44