Created
July 23, 2014 03:56
-
-
Save Reacoder/48683e90095a395d9a01 to your computer and use it in GitHub Desktop.
判断是不是在主线程中。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static boolean isMain() { | |
return Looper.getMainLooper().getThread() == Thread.currentThread(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment