onCheckMainThread

open fun onCheckMainThread(defaultChecker: BooleanSupplier): Boolean

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

Return

true if called on the main thread, false if not.

Parameters

defaultChecker

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