Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
Linhome-Android
Commits
37536f67
Commit
37536f67
authored
Jun 08, 2022
by
Christophe Deschamps
Browse files
Added additional debug
parent
077c238f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
app/src/main/java/org/linhome/store/DeviceStore.kt
app/src/main/java/org/linhome/store/DeviceStore.kt
+5
-0
No files found.
app/src/main/java/org/linhome/store/DeviceStore.kt
View file @
37536f67
...
...
@@ -80,16 +80,21 @@ object DeviceStore {
val
card
=
friend
.
vcard
if
(
card
!=
null
&&
card
.
isValid
())
{
result
.
add
(
Device
(
card
,
false
))
Log
.
i
(
"[DeviceStore] added local device : ${friend.vcard?.asVcard4String()} "
)
}
else
{
Log
.
e
(
"[DeviceStore] unable to create device from card (card is null or invdalid) : ${friend.vcard?.asVcard4String()} "
)
}
}
LinhomeApplication
.
coreContext
.
core
.
config
.
getString
(
"misc"
,
"contacts-vcard-list"
,
null
)
?.
also
{
url
->
Log
.
i
(
"[DeviceStore] Found contacts-vcard-list url : ${url} "
)
LinhomeApplication
.
coreContext
.
core
.
getFriendListByName
(
url
)
?.
also
{
serverFriendList
->
Log
.
i
(
"[DeviceStore] Found remote friend list : ${serverFriendList.displayName} "
)
serverFriendList
.
friends
.
forEach
{
friend
->
Log
.
i
(
"[DeviceStore] Found remote friend : ${friend.name} "
)
val
card
=
friend
.
vcard
if
(
card
!=
null
&&
card
.
isValid
())
{
result
.
add
(
Device
(
card
!!
,
true
))
Log
.
i
(
"[DeviceStore] added remote device : ${friend.vcard?.asVcard4String()} "
)
}
else
{
Log
.
e
(
"[DeviceStore] received invalid or malformed vCard from remote : ${friend.vcard?.asVcard4String()} "
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment