Last active
August 29, 2015 14:22
-
-
Save rafaelwkerr/5adc567fb9481a95272c to your computer and use it in GitHub Desktop.
Verify If Main Thread (Android)
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
public boolean isOnMainThread(){ | |
boolean isOnMainThread = (Looper.myLooper() == Looper.getMainLooper()); | |
return isOnMainThread; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment