From e27e4151cde0ef35009ac3a9912285963441c094 Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Mon, 15 Jun 2020 17:55:23 +0200 Subject: [PATCH] SASL: get rid of smack3 login fail checker --- src/org/yaxim/androidclient/service/XMPPService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/yaxim/androidclient/service/XMPPService.java b/src/org/yaxim/androidclient/service/XMPPService.java index c8945d729..d1fff88a8 100644 --- a/src/org/yaxim/androidclient/service/XMPPService.java +++ b/src/org/yaxim/androidclient/service/XMPPService.java @@ -14,6 +14,7 @@ import org.yaxim.androidclient.util.StatusMode; import org.jivesoftware.smack.packet.Message.Type; +import org.jivesoftware.smack.sasl.SASLErrorException; import android.app.AlarmManager; import android.app.Notification; @@ -501,7 +502,7 @@ private void connectionFailed(String reason) { mSmackable.requestConnectionState(ConnectionState.RECONNECT_NETWORK); } else if (mConnectionDemanded.get()) { - if (reason.contains("SASLError using")) { + if (mSmackable.getLastLoginError() instanceof SASLErrorException) { mConnectionDemanded.set(false); mConfig.jid_configured = false; mSmackable.requestConnectionState(ConnectionState.OFFLINE);