Hi all,

We released an android APP several years ago, and there's a 
View.setVisibility() method used in a sub thread. 
It has been no problem in these years until Android O Developer Preview 4.
When I test our APP on Android O Developer Preview 4, I found 
View.setVisibility() in a sub thread will throw a exception as follows:

*android.view.ViewRootImpl$CalledFromWrongThreadException: Only the 
original thread that created a view hierarchy can touch its views.*


I've moved this method to main thread and fixed this problem.

But my questions are:

1. Why is no exception thrown in previous versions (even in Android O 
Developer Preview 1)?

2. What change in Android O leads to this problem? We should explain it to 
our customer but we can't find the gist on Android developer's website.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/39bde86b-b33d-4f54-ab9a-ee71e4493d53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to