Home | History | Annotate | Download | only in dialpad
      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      */
     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      */
     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      */
     26     public boolean isValidDialpadNumericChar(char ch);
     27 
     28     /*
     29      * Get the index of the key on the dialpad which the character corresponds to
     30      */
     31     public byte getDialpadIndex(char ch);
     32 
     33     /*
     34      * Get the actual numeric character on the dialpad which the character corresponds to
     35      */
     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      */
     42     public char normalizeCharacter(char ch);
     43 }
     44