Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76abb24a authored by Jean Chalard's avatar Jean Chalard Committed by Android Git Automerger
Browse files

am 887568c4: am 01bf82f2: Merge "Add/refine comments to reflect key event policies" into jb-dev

* commit '887568c4':
  Add/refine comments to reflect key event policies
parents b616547c 887568c4
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -1892,6 +1892,13 @@ public class InputMethodService extends AbstractInputMethodService {
     * {@link KeyEvent#FLAG_KEEP_TOUCH_MODE KeyEvent.FLAG_KEEP_TOUCH_MODE}, so
     * that they don't impact the current touch mode of the UI.
     *
     * <p>Note that it's discouraged to send such key events in normal operation;
     * this is mainly for use with {@link android.text.InputType#TYPE_NULL} type
     * text fields, or for non-rich input methods. A reasonably capable software
     * input method should use the
     * {@link android.view.inputmethod.InputConnection#commitText} family of methods
     * to send text to an application, rather than sending key events.</p>
     *
     * @param keyEventCode The raw key code to send, as defined by
     * {@link KeyEvent}.
     */
@@ -1949,7 +1956,11 @@ public class InputMethodService extends AbstractInputMethodService {
     * {@link InputConnection#commitText InputConnection.commitText()} with
     * the character; some, however, may be handled different.  In particular,
     * the enter character ('\n') will either be delivered as an action code
     * or a raw key event, as appropriate.
     * or a raw key event, as appropriate.  Consider this as a convenience
     * method for IMEs that do not have a full implementation of actions; a
     * fully complying IME will decide of the right action for each event and
     * will likely never call this method except maybe to handle events coming
     * from an actual hardware keyboard.
     * 
     * @param charCode The UTF-16 character code to send.
     */
+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@ import android.widget.TextView;
 * Provides a basic foundation for entering and editing text.
 * Subclasses should override {@link #onKeyDown} and {@link #onKeyUp} to insert
 * characters as keys are pressed.
 * <p></p>
 * As for all implementations of {@link KeyListener}, this class is only concerned
 * with hardware keyboards.  Software input methods have no obligation to trigger
 * the methods in this class.
 */
public abstract class BaseKeyListener extends MetaKeyKeyListener
        implements KeyListener {
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,10 @@ import android.text.InputType;

/**
 * For entering dates in a text field.
 * <p></p>
 * As for all implementations of {@link KeyListener}, this class is only concerned
 * with hardware keyboards.  Software input methods have no obligation to trigger
 * the methods in this class.
 */
public class DateKeyListener extends NumberKeyListener
{
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,10 @@ import android.view.KeyEvent;

/**
 * For entering dates and times in the same text field.
 * <p></p>
 * As for all implementations of {@link KeyListener}, this class is only concerned
 * with hardware keyboards.  Software input methods have no obligation to trigger
 * the methods in this class.
 */
public class DateTimeKeyListener extends NumberKeyListener
{
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,10 @@ import android.text.Spannable;

/**
 * For dialing-only text entry
 * <p></p>
 * As for all implementations of {@link KeyListener}, this class is only concerned
 * with hardware keyboards.  Software input methods have no obligation to trigger
 * the methods in this class.
 */
public class DialerKeyListener extends NumberKeyListener
{
Loading