Skip to content
Snippets Groups Projects
Commit 83095070 authored by Adrien Béraud's avatar Adrien Béraud Committed by Sébastien Blin
Browse files

accountservice: bind accountDetailsChanged

Change-Id: I71cf0706e6cb1f5c9c8e3e6c82d63460a14cba17
parent 5660437a
No related branches found
No related tags found
No related merge requests found
...@@ -1017,6 +1017,16 @@ public class AccountService { ...@@ -1017,6 +1017,16 @@ public class AccountService {
} }
} }
void accountDetailsChanged(String accountId, Map<String, String> details) {
Account account = getAccount(accountId);
if (account == null) {
return;
}
Log.d(TAG, "accountDetailsChanged: " + accountId + " " + details.size());
account.setDetails(details);
accountSubject.onNext(account);
}
void volatileAccountDetailsChanged(String accountId, Map<String, String> details) { void volatileAccountDetailsChanged(String accountId, Map<String, String> details) {
Account account = getAccount(accountId); Account account = getAccount(accountId);
if (account == null) { if (account == null) {
...@@ -1024,6 +1034,7 @@ public class AccountService { ...@@ -1024,6 +1034,7 @@ public class AccountService {
} }
Log.d(TAG, "volatileAccountDetailsChanged: " + accountId + " " + details.size()); Log.d(TAG, "volatileAccountDetailsChanged: " + accountId + " " + details.size());
account.setVolatileDetails(details); account.setVolatileDetails(details);
accountSubject.onNext(account);
} }
void incomingAccountMessage(String accountId, String callId, String from, Map<String, String> messages) { void incomingAccountMessage(String accountId, String callId, String from, Map<String, String> messages) {
......
...@@ -141,6 +141,12 @@ public class DaemonService { ...@@ -141,6 +141,12 @@ public class DaemonService {
mExecutor.submit(() -> mAccountService.volatileAccountDetailsChanged(account_id, jdetails)); mExecutor.submit(() -> mAccountService.volatileAccountDetailsChanged(account_id, jdetails));
} }
@Override
public void accountDetailsChanged(String account_id, StringMap details) {
Map<String, String> jdetails = details.toNative();
mExecutor.submit(() -> mAccountService.accountDetailsChanged(account_id, jdetails));
}
@Override @Override
public void incomingAccountMessage(String accountId, String from, StringMap messages) { public void incomingAccountMessage(String accountId, String from, StringMap messages) {
if (messages == null || messages.empty()) if (messages == null || messages.empty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment