public boolean runOnMainThreadNext ( Runnable r ) { assert handler != null ; if ( ! sanityCheck ( "runOnMainThreadNext " + r ) ) { return false ; } return handler . post ( r ) ; }
Queues a Runnable to be run on the main thread on the next iteration of the messaging loop . This is handy when code running on the main thread needs to run something else on the main thread but only after the current code has finished executing .