fixup: simplify loginInfo null check

This commit is contained in:
Daniel Gultsch 2024-02-05 15:59:06 +01:00
parent 5ab8912cb4
commit c2592d1417
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
2 changed files with 21 additions and 14 deletions

1
.gitignore vendored
View file

@ -11,6 +11,7 @@ src/quicksyPlaystore/res/values/push.xml
build/ build/
captures/ captures/
signing.properties signing.properties
signing.managed.properties
# Ignore Gradle GUI config # Ignore Gradle GUI config
gradle-app.setting gradle-app.setting

View file

@ -615,12 +615,29 @@ public class XmppConnection implements Runnable {
} else if (nextTag.isStart("challenge")) { } else if (nextTag.isStart("challenge")) {
final Element challenge = tagReader.readElement(nextTag); final Element challenge = tagReader.readElement(nextTag);
processChallenge(challenge); processChallenge(challenge);
} else if (this.streamId != null
&& nextTag.isStart("resumed", Namespace.STREAM_MANAGEMENT)) {
final Element resumed = tagReader.readElement(nextTag);
processResumed(resumed);
} else if (nextTag.isStart("failed", Namespace.STREAM_MANAGEMENT)) {
final Element failed = tagReader.readElement(nextTag);
processFailed(failed, true);
} else if (nextTag.isStart("iq", Namespace.JABBER_CLIENT)) {
processIq(nextTag);
} else if (!isBound) {
Log.d(
Config.LOGTAG,
account.getJid().asBareJid()
+ ": server sent unexpected"
+ nextTag.identifier());
throw new StateChangingException(Account.State.INCOMPATIBLE_SERVER);
} else if (nextTag.isStart("message", Namespace.JABBER_CLIENT)) {
processMessage(nextTag);
} else if (nextTag.isStart("presence", Namespace.JABBER_CLIENT)) {
processPresence(nextTag);
} else if (nextTag.isStart("enabled", Namespace.STREAM_MANAGEMENT)) { } else if (nextTag.isStart("enabled", Namespace.STREAM_MANAGEMENT)) {
final Element enabled = tagReader.readElement(nextTag); final Element enabled = tagReader.readElement(nextTag);
processEnabled(enabled); processEnabled(enabled);
} else if (nextTag.isStart("resumed", Namespace.STREAM_MANAGEMENT)) {
final Element resumed = tagReader.readElement(nextTag);
processResumed(resumed);
} else if (nextTag.isStart("r", Namespace.STREAM_MANAGEMENT)) { } else if (nextTag.isStart("r", Namespace.STREAM_MANAGEMENT)) {
tagReader.readElement(nextTag); tagReader.readElement(nextTag);
if (Config.EXTENDED_SM_LOGGING) { if (Config.EXTENDED_SM_LOGGING) {
@ -675,17 +692,6 @@ public class XmppConnection implements Runnable {
if (acknowledgedMessages) { if (acknowledgedMessages) {
mXmppConnectionService.updateConversationUi(); mXmppConnectionService.updateConversationUi();
} }
} else if (nextTag.isStart("failed", Namespace.STREAM_MANAGEMENT)) {
final Element failed = tagReader.readElement(nextTag);
processFailed(failed, true);
} else if (nextTag.isStart("iq", Namespace.JABBER_CLIENT)) {
processIq(nextTag);
} else if (!isBound) {
throw new StateChangingException(Account.State.INCOMPATIBLE_SERVER);
} else if (nextTag.isStart("message", Namespace.JABBER_CLIENT)) {
processMessage(nextTag);
} else if (nextTag.isStart("presence", Namespace.JABBER_CLIENT)) {
processPresence(nextTag);
} else { } else {
Log.e( Log.e(
Config.LOGTAG, Config.LOGTAG,