aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-08-31 15:18:40 +0200
committerChristian Schneppe <christian@pix-art.de>2019-08-31 15:19:20 +0200
commit016124b548a81c34a8dd5572fa354eaf00dd058f (patch)
treefa9334a65fbf19b21a490feba1918e1fd540fa8e /src/main/java/de/pixart/messenger/entities
parent6c3b5defa3fc5bafac3810340b2e868fa8d26d8f (diff)
create empty disco result on error to fire advance stream features event
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java b/src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java
index 7b7d0f549..50b118cba 100644
--- a/src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java
+++ b/src/main/java/de/pixart/messenger/entities/ServiceDiscoveryResult.java
@@ -85,6 +85,18 @@ public class ServiceDiscoveryResult {
}
}
+ private ServiceDiscoveryResult() {
+ this.hash = "sha-1";
+ this.features = Collections.emptyList();
+ this.identities = Collections.emptyList();
+ this.ver = null;
+ this.forms = Collections.emptyList();
+ }
+
+ public static ServiceDiscoveryResult empty() {
+ return new ServiceDiscoveryResult();
+ }
+
public ServiceDiscoveryResult(Cursor cursor) throws JSONException {
this(
cursor.getString(cursor.getColumnIndex(HASH)),