public void prepareKeyTransportMessage( final Contact contact, final OnMessageCreatedCallback onMessageCreatedCallback) { executor.execute( new Runnable() { @Override public void run() { XmppAxolotlMessage axolotlMessage = buildHeader(contact); onMessageCreatedCallback.run(axolotlMessage); } }); }
public void preparePayloadMessage(final Message message, final boolean delay) { executor.execute( new Runnable() { @Override public void run() { XmppAxolotlMessage axolotlMessage = encrypt(message); if (axolotlMessage == null) { mXmppConnectionService.markMessage(message, Message.STATUS_SEND_FAILED); // mXmppConnectionService.updateConversationUi(); } else { Log.d( Config.LOGTAG, AxolotlService.getLogprefix(account) + "Generated message, caching: " + message.getUuid()); messageCache.put(message.getUuid(), axolotlMessage); mXmppConnectionService.resendMessage(message, delay); } } }); }