@@ -0,0 +1,597 @@
+package me.majiajie.https;%0D%0A%0D%0A%0D%0Aimport android.os.Handler;%0D%0Aimport android.os.Looper;%0D%0A%0D%0A/**%0D%0A * Android%E7%BA%BF%E7%A8%8B%E7%9B%B8%E5%85%B3%E5%B7%A5%E5%85%B7%E7%B1%BB%0D%0A */%0D%0Apublic class ThreadUtil%0D%0A%7B%0D%0A    /**%0D%0A     * %E5%88%A4%E6%96%AD%E5%BD%93%E5%89%8D%E6%98%AF%E5%90%A6%E4%B8%BA%E4%B8%BB%E7%BA%BF%E7%A8%8B%0D%0A     */%0D%0A    public static boolean isOnMainThread() %7B%0D%0A        return Looper.myLooper() == Looper.getMainLooper();%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * %E5%88%A4%E6%96%AD%E5%BD%93%E5%89%8D%E6%98%AF%E5%90%A6%E4%B8%BA%E5%AD%90%E7%BA%BF%E7%A8%8B%0D%0A     */%0D%0A    public static boolean isOnBackgroundThread() %7B%0D%0A        return !isOnMainThread();%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * %E5%9C%A8%E4%B8%BB%E7%BA%BF%E7%A8%8B%E4%B8%AD%E8%BF%90%E8%A1%8C%0D%0A     */%0D%0A    public static void runOnUiThread(Runnable action)%0D%0A    %7B%0D%0A        new Handler(Looper.getMainLooper()).post(action);%0D%0A    %7D%0D%0A%7D%0D%0A

add thread