title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if called on the main thread.</div>
</li>
</ul>
<a name="isOnMainThread--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOnMainThread</h4>
<pre>public static&nbsp;boolean&nbsp;isOnMainThread()</pre>
<div class="block">Returns <code>true</code> if called on the main thread, <code>false</code> otherwise.</div>
</li>
</ul>
<a name="isOnBackgroundThread--">
<!--   -->
</a>
<ul class="blockList">
<li class="b