Created
November 7, 2019 06:08
-
-
Save Hasiy/cba2cdc014ea6ab3f36aba9d9663f0ed to your computer and use it in GitHub Desktop.
ViewRootImpl#checkThread 子线程不能更新UI,会抛异常
This file contains 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
void checkThread() { | |
if (mThread != Thread.currentThread()) { | |
throw new CalledFromWrongThreadException("Only the original thread that created a view hierarchy can touch its views."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment