The code is not thread-safe. There are two threads accessing the snowflake objects at the same time, the main thread in onDraw() and a background thread. This can cause the snowflakes to be drawn at incorrect positions.
You should really do everything on the main thread if possible, if not then you need to copy the array before passing it to the background thread then post it back to the main thread when the work is done so they don't interfere with each other.
[source]
The code is not thread-safe. There are two threads accessing the snowflake objects at the same time, the main thread in onDraw() and a background thread. This can cause the snowflakes to be drawn at incorrect positions.
You should really do everything on the main thread if possible, if not then you need to copy the array before passing it to the background thread then post it back to the main thread when the work is done so they don't interfere with each other.
[source]