Skip to content

Most visited

Recently visited

navigation

IntentStubberRegistry

public final class IntentStubberRegistry
extends Object

java.lang.Object
   ↳ android.support.test.runner.intent.IntentStubberRegistry


Exposes an implementation of IntentStubber.

Summary

Public methods

static IntentStubber getInstance()

Returns the loaded Intent Stubber mInstance.

static boolean isLoaded()
static void load(IntentStubber intentStubber)

Loads an IntentStubber into this registry.

static void reset()

Clears the current instance of Intent Stubber.

Inherited methods

From class java.lang.Object

Public methods

getInstance

IntentStubber getInstance ()

Returns the loaded Intent Stubber mInstance.

Returns
IntentStubber
Throws
IllegalStateException if this method is not called on the main thread.
IllegalStateException if no Intent Stubber has been loaded.

isLoaded

boolean isLoaded ()

Returns
boolean if an IntentStubber has been loaded.

load

void load (IntentStubber intentStubber)

Loads an IntentStubber into this registry. There can only be one active stubber at a time.

Calling this method multiple times in the same instrumentation will result in an exception.

This method can be called from any thread.

Parameters
intentStubber IntentStubber

reset

void reset ()

Clears the current instance of Intent Stubber.

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.