Summary: Methods | Inherited Methods | [Expand All]

# IdlingPolicies

`public final class IdlingPolicies`
`extends Object` ``

java.lang.Object
↳ | android.support.test.espresso.IdlingPolicies

Allows users fine grain control over idling policies. Espresso's default idling policies are suitable for most usecases - however certain execution environments (like the ARM emulator) might be very slow. This class allows users the ability to adjust defaults to sensible values for their environments.

## Summary

### Public methods
`static IdlingPolicy` | `getDynamicIdlingResourceErrorPolicy()`
`static IdlingPolicy` | `getDynamicIdlingResourceWarningPolicy()`
`static IdlingPolicy` | `getMasterIdlingPolicy()`
`static void` | `setIdlingResourceTimeout(long timeout, TimeUnit unit)` Updates the IdlingPolicy used by IdlingResourceRegistry to determine when IdlingResources timeout.
`static void` | `setMasterPolicyTimeout(long timeout, TimeUnit unit)` Updates the IdlingPolicy used in UiController.loopUntil to detect AppNotIdleExceptions.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()`
`boolean` | `equals(Object arg0)`
`void` | `finalize()`
`final Class<?>` | `getClass()`
`int` | `hashCode()`
`final void` | `notify()`
`final void` | `notifyAll()`
`String` | `toString()`
`final void` | `wait(long arg0, int arg1)`
`final void` | `wait(long arg0)`
`final void` | `wait()`

## Public methods

### getDynamicIdlingResourceErrorPolicy

    IdlingPolicy getDynamicIdlingResourceErrorPolicy ()

Returns
`IdlingPolicy` |

### getDynamicIdlingResourceWarningPolicy

    IdlingPolicy getDynamicIdlingResourceWarningPolicy ()

Returns
`IdlingPolicy` |

### getMasterIdlingPolicy

    IdlingPolicy getMasterIdlingPolicy ()

Returns
`IdlingPolicy` |

### setIdlingResourceTimeout

    void setIdlingResourceTimeout (long timeout,
                    TimeUnit unit)

Updates the IdlingPolicy used by IdlingResourceRegistry to determine when IdlingResources timeout.

Parameters
`timeout` | `long`: the timeout before an IdlingResourceTimeoutException is created.
`unit` | `TimeUnit`: the unit of the timeout value.

### setMasterPolicyTimeout

    void setMasterPolicyTimeout (long timeout,
                    TimeUnit unit)

Updates the IdlingPolicy used in UiController.loopUntil to detect AppNotIdleExceptions.

Parameters
`timeout` | `long`: the timeout before an AppNotIdleException is created.
`unit` | `TimeUnit`: the unit of the timeout value.

- ## Interfaces

  - BaseLayerComponent
  - EspressoException
  - FailureHandler
  - IdlingResource
  - IdlingResource.ResourceCallback
  - UiController
  - ViewAction
  - ViewAssertion
  - ViewFinder
  - ViewInteractionComponent

- ## Classes

  - AmbiguousViewMatcherException.Builder
  - DataInteraction
  - Espresso
  - GraphHolder
  - IdlingPolicies
  - IdlingPolicy
  - NoMatchingViewException.Builder
  - PerformException.Builder
  - Root
  - Root.Builder
  - ViewInteraction

- ## Exceptions

  - AmbiguousViewMatcherException
  - AppNotIdleException
  - IdlingResourceTimeoutException
  - InjectEventSecurityException
  - NoActivityResumedException
  - NoMatchingRootException
  - NoMatchingViewException
  - PerformException