Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
xabber-android
Commits
c3af86eb
Commit
c3af86eb
authored
Aug 03, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VCardManager: empty vCard receiving fixed.
parent
ef34dbba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
VCardManager.java
...com/xabber/android/data/extension/vcard/VCardManager.java
+11
-1
No files found.
app/src/main/java/com/xabber/android/data/extension/vcard/VCardManager.java
View file @
c3af86eb
...
...
@@ -41,6 +41,7 @@ import org.jivesoftware.smack.XMPPException;
import
org.jivesoftware.smack.packet.IQ.Type
;
import
org.jivesoftware.smack.packet.Presence
;
import
org.jivesoftware.smack.packet.Stanza
;
import
org.jivesoftware.smack.packet.XMPPError
;
import
org.jivesoftware.smackx.vcardtemp.packet.VCard
;
import
java.util.ArrayList
;
...
...
@@ -260,13 +261,22 @@ public class VCardManager implements OnLoadListener, OnPacketListener,
@Override
public
void
run
()
{
VCard
vCard
=
null
;
try
{
vCard
=
vCardManager
.
loadVCard
(
Jid
.
getBareAddress
(
user
));
}
catch
(
SmackException
.
NoResponseException
|
XMPPException
.
XMPPErrorException
|
SmackException
.
NotConnectedException
e
)
{
}
catch
(
SmackException
.
NoResponseException
|
SmackException
.
NotConnectedException
e
)
{
LogManager
.
w
(
this
,
"Error getting vCard: "
+
e
.
getMessage
());
}
catch
(
XMPPException
.
XMPPErrorException
e
)
{
LogManager
.
w
(
this
,
"XMPP error getting vCard: "
+
e
.
getMessage
()
+
e
.
getXMPPError
());
if
(
e
.
getXMPPError
().
getCondition
()
==
XMPPError
.
Condition
.
item_not_found
)
{
vCard
=
new
VCard
();
}
}
catch
(
ClassCastException
e
)
{
// http://stackoverflow.com/questions/31498721/error-loading-vcard-information-using-smack-emptyresultiq-cannot-be-cast-to-or
LogManager
.
w
(
this
,
"ClassCastException: "
+
e
.
getMessage
());
vCard
=
new
VCard
();
}
final
VCard
finalVCard
=
vCard
;
...
...
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