autodispose-android / com.uber.autodispose.android / AutoDisposeAndroidPlugins / onCheckMainThread

onCheckMainThread

static fun onCheckMainThread(defaultChecker: BooleanSupplier): Boolean
static fun onCheckMainThread(defaultChecker: BooleanSupplier): Boolean

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

Parameters

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

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