Lines Matching defs:event

139          * @param event The received event.
141 public void onAccessibilityEvent(AccessibilityEvent event);
150 * Callback for determining whether an event is accepted or
153 * @param event The event to process.
154 * @return True if the event is accepted, false to filter it out.
156 public boolean accept(AccessibilityEvent event);
422 * A method for injecting an arbitrary input event.
424 * <strong>Note:</strong> It is caller's responsibility to recycle the event.
426 * @param event The event to inject.
427 * @param sync Whether to inject the event synchronously.
428 * @return Whether event injection succeeded.
430 public boolean injectInputEvent(InputEvent event, boolean sync) {
436 Log.i(LOG_TAG, "Injecting: " + event + " sync: " + sync);
439 return mUiAutomationConnection.injectInputEvent(event, sync);
441 Log.e(LOG_TAG, "Error while injecting input event!", re);
488 * Executes a command and waits for a specific accessibility event up to a
491 * returns true after the last event of that sequence is received.
493 * <strong>Note:</strong> It is caller's responsibility to recycle the returned event.
496 * @param filter Filter that recognizes the expected event.
499 * @throws TimeoutException If the expected event is not received within the timeout.
507 // Prepare to wait for an event.
520 // Acquire the lock and wait for the event.
523 // Wait for the event.
526 // Drain the event queue
528 AccessibilityEvent event = mEventQueue.remove(0);
530 if (event.getEventTime() < executionStartTimeMillis) {
533 if (filter.accept(event)) {
534 return event;
536 event.recycle();
542 throw new TimeoutException("Expected event not received within: "
560 * Waits for the accessibility event stream to become idle, which is not to
561 * have received an accessibility event within <code>idleTimeoutMillis</code>.
562 * The total time spent to wait for an idle accessibility event stream is bounded
947 public void onAccessibilityEvent(AccessibilityEvent event) {
949 mLastEventTimeMillis = event.getEventTime();
951 mEventQueue.add(AccessibilityEvent.obtain(event));
958 listener.onAccessibilityEvent(AccessibilityEvent.obtain(event));
963 public boolean onKeyEvent(KeyEvent event) {