RTP: write log message on background thread
This commit is contained in:
parent
b7f3b4333e
commit
0ba4892d3e
|
@ -3303,6 +3303,10 @@ public class XmppConnectionService extends Service {
|
|||
updateConversationUi();
|
||||
}
|
||||
|
||||
public void createMessageAsync(final Message message) {
|
||||
mDatabaseWriterExecutor.execute(()-> databaseBackend.createMessage(message));
|
||||
}
|
||||
|
||||
public void updateMessage(Message message, String uuid) {
|
||||
if (!databaseBackend.updateMessage(message, uuid)) {
|
||||
Log.e(Config.LOGTAG, "error updated message in DB after edit");
|
||||
|
|
|
@ -1219,7 +1219,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
final Conversational conversational = message.getConversation();
|
||||
if (conversational instanceof Conversation) {
|
||||
((Conversation) conversational).add(this.message);
|
||||
xmppConnectionService.databaseBackend.createMessage(message);
|
||||
xmppConnectionService.createMessageAsync(message);
|
||||
xmppConnectionService.updateConversationUi();
|
||||
} else {
|
||||
throw new IllegalStateException("Somehow the conversation in a message was a stub");
|
||||
|
|
Loading…
Reference in New Issue