onCheckMainThread

open fun onCheckMainThread(defaultChecker: BooleanSupplier): Boolean

Returns {@code true} if called on the main thread, {@code false} if not. This will prefer a set checker via setOnCheckMainThread if one is present, otherwise it will use {@code defaultChecker}.

Return

{@code true} if called on the main thread, {@code false} if not.

Parameters

defaultChecker

the default checker to fall back to if there is no main thread checker set.

private open var onCheckMainThread: BooleanSupplier