Back to project page Tvdb-Api-Android.
The source code is released under:
Apache License
If you think the Android project Tvdb-Api-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.sburba.tvdbapi.util; //from w ww.j a v a2 s .c o m import android.os.Looper; import com.sburba.tvdbapi.BuildConfig; public class ThreadPreconditions { public static void checkOnMainThread() { if (BuildConfig.DEBUG) { if (Thread.currentThread() != Looper.getMainLooper().getThread()) { throw new IllegalStateException("This method must be called from the UI thread"); } } } }