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

AccountService: convert profile map to Java for async processing

Change-Id: I6c0e5d666fb952364a8b0b767f8b57236aa836af
parent 4498c231
No related branches found
No related tags found
No related merge requests found
...@@ -266,7 +266,7 @@ class AccountService( ...@@ -266,7 +266,7 @@ class AccountService(
Log.w(TAG, "$accountId loading ${conversations.size} conversations: ") Log.w(TAG, "$accountId loading ${conversations.size} conversations: ")
for (conversationId in conversations) { for (conversationId in conversations) {
try { try {
val info: Map<String, String> = JamiService.conversationInfos(accountId, conversationId) val info: Map<String, String> = JamiService.conversationInfos(accountId, conversationId).toNativeFromUtf8()
/*for (Map.Entry<String, String> i : info.entrySet()) { /*for (Map.Entry<String, String> i : info.entrySet()) {
Log.w(TAG, "conversation info: " + i.getKey() + " " + i.getValue()); Log.w(TAG, "conversation info: " + i.getKey() + " " + i.getValue());
}*/ }*/
...@@ -301,7 +301,7 @@ class AccountService( ...@@ -301,7 +301,7 @@ class AccountService(
} }
} }
Log.w(TAG, "$accountId loading conversation requests") Log.w(TAG, "$accountId loading conversation requests")
for (requestData in JamiService.getConversationRequests(account.accountId)) { for (requestData in JamiService.getConversationRequests(account.accountId).map { it.toNativeFromUtf8() }) {
try { try {
/* for ((key, value) in requestData.entries) /* for ((key, value) in requestData.entries)
Log.e(TAG, "Request: $key $value") */ Log.e(TAG, "Request: $key $value") */
...@@ -1291,7 +1291,7 @@ class AccountService( ...@@ -1291,7 +1291,7 @@ class AccountService(
} }
fun conversationProfileUpdated(accountId: String, conversationId: String, info: StringMap) { fun conversationProfileUpdated(accountId: String, conversationId: String, info: StringMap) {
getAccount(accountId)?.getSwarm(conversationId)?.setProfile(mVCardService.loadConversationProfile(info)) getAccount(accountId)?.getSwarm(conversationId)?.setProfile(mVCardService.loadConversationProfile(info.toNativeFromUtf8()))
} }
fun conversationPreferencesUpdated(accountId: String, conversationId: String, preferences: StringMap) { fun conversationPreferencesUpdated(accountId: String, conversationId: String, preferences: StringMap) {
...@@ -1329,7 +1329,7 @@ class AccountService( ...@@ -1329,7 +1329,7 @@ class AccountService(
Log.w(TAG, "conversationReady: can't find account") Log.w(TAG, "conversationReady: can't find account")
return return
} }
val info = JamiService.conversationInfos(accountId, conversationId) val info = JamiService.conversationInfos(accountId, conversationId).toNativeFromUtf8()
/*for (Map.Entry<String, String> i : info.entrySet()) { /*for (Map.Entry<String, String> i : info.entrySet()) {
Log.w(TAG, "conversation info: " + i.getKey() + " " + i.getValue()); Log.w(TAG, "conversation info: " + i.getKey() + " " + i.getValue());
}*/ }*/
......
...@@ -340,7 +340,7 @@ class DaemonService( ...@@ -340,7 +340,7 @@ class DaemonService(
} }
override fun conversationRequestReceived(accountId: String, conversationId: String, metadata: StringMap) { override fun conversationRequestReceived(accountId: String, conversationId: String, metadata: StringMap) {
mAccountService.conversationRequestReceived(accountId, conversationId, metadata.toNative()) mAccountService.conversationRequestReceived(accountId, conversationId, metadata.toNativeFromUtf8())
} }
override fun conversationRequestDeclined(accountId: String, conversationId: String) { override fun conversationRequestDeclined(accountId: String, conversationId: String) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment