show 215 status in server info

This commit is contained in:
Daniel Gultsch 2020-04-21 11:40:05 +02:00
parent d5e3d13158
commit eb911b8196
5 changed files with 30 additions and 4 deletions

View file

@ -3,7 +3,6 @@ package eu.siacs.conversations.ui;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.SharedPreferences;
@ -63,7 +62,6 @@ import eu.siacs.conversations.ui.util.AvatarWorkerTask;
import eu.siacs.conversations.ui.util.MenuDoubleTabUtil;
import eu.siacs.conversations.ui.util.PendingItem;
import eu.siacs.conversations.ui.util.SoftKeyboardUtils;
import eu.siacs.conversations.ui.util.StyledAttributes;
import eu.siacs.conversations.utils.CryptoHelper;
import eu.siacs.conversations.utils.Resolver;
import eu.siacs.conversations.utils.SignupUtils;
@ -1060,6 +1058,11 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
} else {
this.binding.serverInfoSm.setText(R.string.server_info_unavailable);
}
if (features.externalServiceDiscovery()) {
this.binding.serverInfoExternalService.setText(R.string.server_info_available);
} else {
this.binding.serverInfoExternalService.setText(R.string.server_info_unavailable);
}
if (features.pep()) {
AxolotlService axolotlService = this.mAccount.getAxolotlService();
if (axolotlService != null && axolotlService.isPepBroken()) {

View file

@ -1903,7 +1903,7 @@ public class XmppConnection implements Runnable {
return Config.USE_BOOKMARKS2 /* || hasDiscoFeature(account.getJid().asBareJid(), Namespace.BOOKMARKS2_COMPAT)*/;
}
public boolean extendedServiceDiscovery() {
public boolean externalServiceDiscovery() {
return hasDiscoFeature(Jid.of(account.getServer()),Namespace.EXTERNAL_SERVICE_DISCOVERY);
}
}

View file

@ -999,7 +999,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
}
private void discoverIceServers(final OnIceServersDiscovered onIceServersDiscovered) {
if (id.account.getXmppConnection().getFeatures().extendedServiceDiscovery()) {
if (id.account.getXmppConnection().getFeatures().externalServiceDiscovery()) {
final IqPacket request = new IqPacket(IqPacket.TYPE.GET);
request.setTo(Jid.of(id.account.getJid().getDomain()));
request.addChild("services", Namespace.EXTERNAL_SERVICE_DISCOVERY);

View file

@ -338,6 +338,28 @@
tools:ignore="RtlHardcoded"/>
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/server_info_external_service_discovery"
android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
<TextView
android:id="@+id/server_info_external_service"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.Conversations.Body1"
tools:ignore="RtlHardcoded"/>
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content">

View file

@ -192,6 +192,7 @@
<string name="server_info_blocking">XEP-0191: Blocking Command</string>
<string name="server_info_roster_version">XEP-0237: Roster Versioning</string>
<string name="server_info_stream_management">XEP-0198: Stream Management</string>
<string name="server_info_external_service_discovery">XEP-0215: External Service Discovery</string>
<string name="server_info_pep">XEP-0163: PEP (Avatars / OMEMO)</string>
<string name="server_info_http_upload">XEP-0363: HTTP File Upload</string>
<string name="server_info_push">XEP-0357: Push</string>