@Override public boolean queueIdle() { // Log.i(logTag, "in idle handler"); if (nativeRender()) { // Log.i(logTag, "will re-run"); Message msg = Message.obtain(); handler.sendMessageAtFrontOfQueue( msg); // force idle handler to re-run in case of no pending msgs return true; } else { // Log.i(logTag, "won't re-run"); idleHandlerActive = false; return false; } }
// Send a message from the SDLMain thread void sendCommand(int command, Object data) { Message msg = commandHandler.obtainMessage(); msg.arg1 = command; msg.obj = data; commandHandler.sendMessage(msg); }