1 add synchronized key word to make update visibility to other thread.
2 hide action bar
3 move UI update code to UI thread.