@@ -0,0 +1,1018 @@
+package com.camnter.newlife.utils;%0A%0Aimport android.os.Looper;%0A%0A/**%0A * Description%EF%BC%9AThreadUtil%0A * Created by%EF%BC%9ACaMnter%0A * Time%EF%BC%9A2015-12-01 12:22%0A */%0Apublic class ThreadUtil %7B%0A%0A    private static final String MAIN_THREAD_MSG = %22MainThread-%25d: %25s%22;%0A    private static final String CHILD_THREAD_MSG = %22ChildThread-%25d: %25s%22;%0A%0A    /**%0A     * Determine whether to the main thread%0A     * %E5%88%A4%E6%96%AD%E6%98%AF%E5%90%A6%E4%B8%BA%E4%B8%BB%E7%BA%BF%E7%A8%8B%0A     *%0A     * @return true or false%0A     */%0A    public static boolean isMainThread() %7B%0A        return Thread.currentThread() == Looper.getMainLooper().getThread();%0A    %7D%0A%0A    /**%0A     * Formatting information, formatting and thread information%0A     * %E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BF%A1%E6%81%AF%EF%BC%8C%E6%A0%BC%E5%BC%8F%E5%8C%96%E5%90%8E%E6%9C%89%E7%BA%BF%E7%A8%8B%E4%BF%A1%E6%81%AF%0A     *%0A     * @param info info%0A     * @return msg%0A     */%0A    public static String getThreadMsg(String info) %7B%0A        if (ThreadUtil.isMainThread()) %7B%0A            return String.format(MAIN_THREAD_MSG, Thread.currentThread().getId(), info);%0A        %7D else %7B%0A            return String.format(CHILD_THREAD_MSG, Thread.currentThread().getId(), info);%0A        %7D%0A    %7D%0A%0A%7D%0A

add ThreadUtil