Fixed CalledFromWrongThreadException by using runOnUiThread.
merge a3b06f7ff6a530ff5cd204ff7f3ced61a7b6a390 from trancee