You will need synchronized synchronized if you have a shared resource like ArrayList or something that can be read from two threads at the same time.
The handler itself does not prevent any concurrency, it simply simplifies the execution of actions that should occur in the user interface thread, although the worker thread tries to execute them.
To answer your question: if you use a handler, this usually means that you are doing some important things in the user interface thread. As an example, you have ArrayList , you initialize in onCreate , and then, perhaps, update handler clicks or something like that. Now, if you use a handler to modify it, then ALL access to the ArrayList will occur in the user interface thread, so there is no need for synchronized .
However, as soon as you access this ArrayList from the workflow, you need to synchronize every access to it.
source share