Class ViewThreadChecker

java.lang.Object
org.robolectric.shadows.ViewThreadChecker
All Implemented Interfaces:
MethodHandleDecorator

@AutoService(MethodHandleDecorator.class) public class ViewThreadChecker extends Object implements MethodHandleDecorator
A MethodHandleDecorator that enforces that all View methods are called on the main thread.

This decorator is enabled if the system property robolectric.enforceViewMethodsCalledOnMainThread is set to true, or if

invalid reference
ShadowView#enableThreadCheck
is true.