AppNotIdleException

public final class AppNotIdleException
extends RuntimeException implements EspressoException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ android.support.test.espresso.AppNotIdleException


An exception which indicates that the App has not become idle even after the specified duration.

Summary

Public methods

static AppNotIdleException create(List<String> idleConditions, int loopCount, int seconds)

This method is deprecated. use create(List, String) instead

static AppNotIdleException create(List<String> idleConditions, String message)

Creates a new AppNotIdleException suitable for erroring out a test case.

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public methods

create

AppNotIdleException create (List<String> idleConditions, 
                int loopCount, 
                int seconds)

This method is deprecated.
use create(List, String) instead

Creates a new AppNotIdleException suitable for erroring out a test case.

This should be called only from the main thread if the app does not idle out within the specified duration.

Parameters
idleConditions List: list of idleConditions that failed to become idle.

loopCount int: number of times it was tried to check if they became idle.

seconds int: number of seconds that was tried before giving up.

Returns
AppNotIdleException a AppNotIdleException suitable to be thrown on the instrumentation thread.

create

AppNotIdleException create (List<String> idleConditions, 
                String message)

Creates a new AppNotIdleException suitable for erroring out a test case.

This should be called only from the main thread if the app does not idle out within the specified duration.

Parameters
idleConditions List: list of idleConditions that failed to become idle.

message String: a message about the failure.

Returns
AppNotIdleException a AppNotIdleException suitable to be thrown on the instrumentation thread.