Skip to content
Snippets Groups Projects
Commit f9a35531 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

account: adapt for new daemon API

Change-Id: Ifccca815c3b700cdc57210f296180e004c6a06a0
parent b86629c3
Branches
Tags
No related merge requests found
......@@ -120,6 +120,7 @@ public class AccountService {
public static class Message {
String accountId;
String messageId;
String callId;
String author;
Map<String, String> messages;
......@@ -1234,10 +1235,11 @@ public class AccountService {
accountSubject.onNext(account);
}
void incomingAccountMessage(String accountId, String callId, String from, Map<String, String> messages) {
void incomingAccountMessage(String accountId, String messageId, String callId, String from, Map<String, String> messages) {
Log.d(TAG, "incomingAccountMessage: " + accountId + " " + messages.size());
Message message = new Message();
message.accountId = accountId;
message.messageId = messageId;
message.callId = callId;
message.author = from;
message.messages = messages;
......
......@@ -504,7 +504,7 @@ public class CallService {
mContactService.saveVCardContactData(sipCall.getContact(), sipCall.getAccount(), vcard);
}
if (messages.containsKey(MIME_TEXT_PLAIN)) {
mAccountService.incomingAccountMessage(sipCall.getAccount(), callId, from, messages);
mAccountService.incomingAccountMessage(sipCall.getAccount(), null, callId, from, messages);
}
}
......
......@@ -145,11 +145,11 @@ public class DaemonService {
}
@Override
public void incomingAccountMessage(String accountId, String from, StringMap messages) {
public void incomingAccountMessage(String accountId, String messageId, String from, StringMap messages) {
if (messages == null || messages.isEmpty())
return;
Map<String, String> jmessages = messages.toNativeFromUtf8();
mExecutor.submit(() -> mAccountService.incomingAccountMessage(accountId, null, from, jmessages));
mExecutor.submit(() -> mAccountService.incomingAccountMessage(accountId, messageId, null, from, jmessages));
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment