@ThreadSafe public final class ThreadUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ThreadUtil.ThreadPriority
Rich enum for the Android thread priority levels.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isMainThread() |
static HandlerThread |
newHandlerThread(String threadName,
ThreadUtil.ThreadPriority threadPriority)
Obtains a new, started HandlerThread.
|
public static boolean isMainThread()
public static HandlerThread newHandlerThread(String threadName, ThreadUtil.ThreadPriority threadPriority)
threadName - Name of the thread.threadPriority - Priority of the thread. Must be one of the priority constants defined
in Process.threadName and threadPriority, whose
Thread.start() method has already been called.