# InterruptableUiController

Artifact: [androidx.test.espresso:espresso-core](https://developer.android.com/jetpack/androidx/releases/test-espresso) [View Source](https://cs.android.com/search?q=file:androidx/test/espresso/base/InterruptableUiController.java+class:androidx.test.espresso.base.InterruptableUiController)

*** ** * ** ***


```
public interface InterruptableUiController extends UiController
```

<br />

*** ** * ** ***

Similar to `https://developer.android.com/reference/androidx/test/espresso/UiController` but with one additional method that enables interrupting Espresso tasks.

This interface used for Espresso internals and shouldn't be called by external users. It's much safer to let all Espresso tasks to be successfully executed on the main thread.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/test/espresso/base/InterruptableUiController#interruptEspressoTasks()()` Interrupts all Espresso tasks scheduled to be executed on the main thread. |

| ### Inherited methods |
|---|
| From [androidx.test.espresso.UiController](https://developer.android.com/reference/androidx/test/espresso/UiController) |---|---| | `abstract boolean` | `https://developer.android.com/reference/androidx/test/espresso/UiController#injectKeyEvent(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent.html event)` Injects a key event into the application. | | `abstract boolean` | `https://developer.android.com/reference/androidx/test/espresso/UiController#injectMotionEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent.html event)` Injects a motion event into the application. | | `default boolean` | `https://developer.android.com/reference/androidx/test/espresso/UiController#injectMotionEventSequence(java.lang.Iterable<android.view.MotionEvent>)(https://developer.android.com/reference/java/lang/Iterable.html<https://developer.android.com/reference/android/view/MotionEvent.html> events)` | | `abstract boolean` | `https://developer.android.com/reference/androidx/test/espresso/UiController#injectString(java.lang.String)(https://developer.android.com/reference/java/lang/String.html str)` Types a string into the application using series of `https://developer.android.com/reference/android/view/KeyEvent.html`s. | | `abstract void` | `https://developer.android.com/reference/androidx/test/espresso/UiController#loopMainThreadForAtLeast(long)(long millisDelay)` Loops the main thread for a specified period of time. | | `abstract void` | `https://developer.android.com/reference/androidx/test/espresso/UiController#loopMainThreadUntilIdle()()` Loops the main thread until the application goes idle. | |

## Public methods

### interruptEspressoTasks

```
abstract void interruptEspressoTasks()
```

Interrupts all Espresso tasks scheduled to be executed on the main thread.

Note: This method is used for Espresso internals and shouldn't be called by external users. It's much safer to let all Espresso tasks to be successfully executed on the main thread.