Lines Matching refs:keyEvent
36 import android.view.KeyEvent;
225 * To simulate a key press, you must first send a KeyEvent built with
226 * a {@link KeyEvent#ACTION_DOWN} action, then another event with the {@link KeyEvent#ACTION_UP}
232 * @param keyEvent a {@link KeyEvent} instance whose key code is one of
233 * {@link KeyEvent#KEYCODE_MUTE},
234 * {@link KeyEvent#KEYCODE_HEADSETHOOK},
235 * {@link KeyEvent#KEYCODE_MEDIA_PLAY},
236 * {@link KeyEvent#KEYCODE_MEDIA_PAUSE},
237 * {@link KeyEvent#KEYCODE_MEDIA_PLAY_PAUSE},
238 * {@link KeyEvent#KEYCODE_MEDIA_STOP},
239 * {@link KeyEvent#KEYCODE_MEDIA_NEXT},
240 * {@link KeyEvent#KEYCODE_MEDIA_PREVIOUS},
241 * {@link KeyEvent#KEYCODE_MEDIA_REWIND},
242 * {@link KeyEvent#KEYCODE_MEDIA_RECORD},
243 * {@link KeyEvent#KEYCODE_MEDIA_FAST_FORWARD},
244 * {@link KeyEvent#KEYCODE_MEDIA_CLOSE},
245 * {@link KeyEvent#KEYCODE_MEDIA_EJECT},
246 * or {@link KeyEvent#KEYCODE_MEDIA_AUDIO_TRACK}.
250 public boolean sendMediaKeyEvent(KeyEvent keyEvent) throws IllegalArgumentException {
251 if (!KeyEvent.isMediaKey(keyEvent.getKeyCode())) {
256 return mCurrentSession.dispatchMediaButtonEvent(keyEvent);