MediaRouterTestHelper


public class MediaRouterTestHelper


A helper class for testing usages of MediaRouter.

Summary

Public methods

static void

Resets all internal state of MediaRouter for testing.

Public methods

resetMediaRouter

Added in 1.3.0
@MainThread
public static void resetMediaRouter()

Resets all internal state of MediaRouter for testing. Should be only used for testing purpose.

After calling this method, the caller should stop using the existing media router instances. Instead, the caller should create a new media router instance again by calling getInstance.

Note that the following classes' instances need to be recreated after calling this method, as these classes store the media router instance on their constructor:

Please make sure this is called in the main thread.