Lines Matching refs:monitor

55  * before any of the application code, allowing you to monitor all of the
409 * when a new activity is being started the monitor will be checked and, if
434 * @param which The set of intents this monitor is responsible for.
435 * @param result A canned result to return if the monitor is hit; can
437 * @param block Controls whether the monitor should block the activity
455 * @param cls The activity class this monitor is responsible for.
456 * @param result A canned result to return if the monitor is hit; can
458 * @param block Controls whether the monitor should block the activity
488 * Check whether this monitor blocks activity starts (not allowing the
496 * Retrieve the number of times the monitor has been hit so far.
504 * monitor.
511 * Block until an Activity is created that matches this monitor,
531 * Block until an Activity is created that matches this monitor,
588 * activity is started. The monitor is added
589 * after any existing ones; the monitor will be hit only if none of the
592 * @param monitor The new ActivityMonitor to see.
597 public void addMonitor(ActivityMonitor monitor) {
602 mActivityMonitors.add(monitor);
611 * @param filter The set of intents this monitor is responsible for.
612 * @param result A canned result to return if the monitor is hit; can
614 * @param block Controls whether the monitor should block the activity
618 * @return The newly created and added activity monitor.
634 * @param cls The activity class this monitor is responsible for.
635 * @param result A canned result to return if the monitor is hit; can
637 * @param block Controls whether the monitor should block the activity
641 * @return The newly created and added activity monitor.
655 * monitor has been hit at least <var>minHits</var> times, then it will be
656 * removed from the activity monitor list and true returned. Otherwise it
659 * @param monitor The ActivityMonitor to check.
666 public boolean checkMonitorHit(ActivityMonitor monitor, int minHits) {
669 if (monitor.getHits() < minHits) {
672 mActivityMonitors.remove(monitor);
679 * monitor has been hit, it is removed from the activity monitor list and
682 * @param monitor The ActivityMonitor to wait for.
684 * @return The Activity object that matched the monitor.
686 public Activity waitForMonitor(ActivityMonitor monitor) {
687 Activity activity = monitor.waitForActivity();
689 mActivityMonitors.remove(monitor);
696 * expires. Once the monitor has been hit, it is removed from the activity
697 * monitor list and the first created Activity object that matched it is
700 * @param monitor The ActivityMonitor to wait for.
703 * @return The Activity object that matched the monitor.
705 public Activity waitForMonitorWithTimeout(ActivityMonitor monitor, long timeOut) {
706 Activity activity = monitor.waitForActivityWithTimeout(timeOut);
708 mActivityMonitors.remove(monitor);
717 * @param monitor The monitor to remove.
721 public void removeMonitor(ActivityMonitor monitor) {
723 mActivityMonitors.remove(monitor);