isOnUiThread

open fun isOnUiThread(): Boolean

Return

true if the current thread is the UI thread.