Looper.getMainLooper().getThread() == Thread.currentThread();
or you can also use this Looper.myLooper() == Looper.getMainLooper()
Looper.getMainLooper().getThread() == Thread.currentThread();
or you can also use this Looper.myLooper() == Looper.getMainLooper()