Android examples for java.lang:Thread
is On Ui Thread
//package com.java2s; import android.os.Looper; public class Main { public static boolean isOnUiThread() { return Thread.currentThread() == Looper.getMainLooper().getThread(); }/*w w w . j a v a 2 s . c o m*/ }