Use Looper.getMainLooper().getThread() to get the UI thread. You can check if it is the current thread using the following expression:
Looper.getMainLooper().getThread() == Thread.currentThread()
Use Looper.getMainLooper().getThread() to get the UI thread. You can check if it is the current thread using the following expression:
Looper.getMainLooper().getThread() == Thread.currentThread()