What is the point of postMessage() etc on android?

What I see is that a postMessage() just invokes the messagecallback which happens a bit later.

I can't see anywhere that the Android code uses it... what am I missing?

Don't understand the question.. The point of that method is the same on android as it is on all the other OSes... It's used internally by loads of the other classes, e.g. Timers, AsyncUpdaters, etc etc

OK.  But since it has to percolate over the JNI up to the Java and then around through a roundabout mechanism before getting sent back down to the C++ level, it seems like a waste of CPU.  Is there a specific reason for the round trip, or could it be just as easily accomplished using an internal thread+queue in the C++?

No.. it's essential that it happens on the system message thread, alongside the other GUI messages on the event loop.

Besides, the amount of CPU involved should be tiny. You shouldn't fall into the trap of worrying about CPU except for functions that you've actually profiled and measured to be a problem.

Hi, Jules -

No, I'm not an excessive profiler fanatic.  But it just seemed odd.  Now you've explained it, it's less odd :)