I have a Handler
which is linked to the UI thread. As expected, I can post()
Runnable
s to it and have them execute on the UI thread. I also have a button, which when pressed will invoke finish()
on the Activity
.
How does finish()
affect a UI Handler's message queue? Will it process all messages in the queue but accept no more? Will it just bluntly refuse to run anything and terminate immediately (I have reason to believe this is not true). Will it continue to allow Runnable
s to be posted to it until onDestroy()
is called? You should assume that the activity stack just contains a single activity.