diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-12-18 11:49:27 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-12-18 11:49:27 +0100 |
commit | fbbf1a37b47b3967699bdb88ac31f5959b34dba6 (patch) | |
tree | ad591e80d086b37de15aeeeb162b488ac8dcb1d0 /src/main/java/eu/siacs/conversations/crypto/axolotl | |
parent | dbda2afd6db9206284d6153960b836de088f0e20 (diff) |
disable removing of broken devices by default
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto/axolotl')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java index 020b76a3..8f586f3a 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java @@ -804,17 +804,19 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded { } mXmppConnectionService.keyStatusUpdated(report); } - Set<Integer> ownDeviceIds = new HashSet<>(getOwnDeviceIds()); - boolean publish = false; - for(Map.Entry<Integer,FetchStatus> entry : own.entrySet()) { - int id = entry.getKey(); - if (entry.getValue() == FetchStatus.ERROR && PREVIOUSLY_REMOVED_FROM_ANNOUNCEMENT.add(id) && ownDeviceIds.remove(id)) { - publish = true; - Log.d(Config.LOGTAG,account.getJid().toBareJid()+": error fetching own device with id "+id+". removing from announcement"); + if (Config.REMOVE_BROKEN_DEVICES) { + Set<Integer> ownDeviceIds = new HashSet<>(getOwnDeviceIds()); + boolean publish = false; + for (Map.Entry<Integer, FetchStatus> entry : own.entrySet()) { + int id = entry.getKey(); + if (entry.getValue() == FetchStatus.ERROR && PREVIOUSLY_REMOVED_FROM_ANNOUNCEMENT.add(id) && ownDeviceIds.remove(id)) { + publish = true; + Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": error fetching own device with id " + id + ". removing from announcement"); + } + } + if (publish) { + publishOwnDeviceId(ownDeviceIds); } - } - if (publish) { - publishOwnDeviceId(ownDeviceIds); } } |