refactoring: do not create explicit handlers when not needed

When no information is to be carried to the handler, if the handler is
called from one place it is simpler to use runOnUiThread rather than
to construct an explicit handler.