Clean up
Fixes some random linter warnings.
This commit is contained in:
parent
a7c7a42136
commit
fdd88aa530
|
@ -140,9 +140,6 @@ public class AxolotlService {
|
||||||
putDevicesForJid(account.getJid().toBareJid().toString(), deviceIds, store);
|
putDevicesForJid(account.getJid().toBareJid().toString(), deviceIds, store);
|
||||||
for (Contact contact : account.getRoster().getContacts()) {
|
for (Contact contact : account.getRoster().getContacts()) {
|
||||||
Jid bareJid = contact.getJid().toBareJid();
|
Jid bareJid = contact.getJid().toBareJid();
|
||||||
if (bareJid == null) {
|
|
||||||
continue; // FIXME: handle this?
|
|
||||||
}
|
|
||||||
String address = bareJid.toString();
|
String address = bareJid.toString();
|
||||||
deviceIds = store.getSubDeviceSessions(address);
|
deviceIds = store.getSubDeviceSessions(address);
|
||||||
putDevicesForJid(address, deviceIds, store);
|
putDevicesForJid(address, deviceIds, store);
|
||||||
|
@ -162,7 +159,7 @@ public class AxolotlService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static enum FetchStatus {
|
private enum FetchStatus {
|
||||||
PENDING,
|
PENDING,
|
||||||
SUCCESS,
|
SUCCESS,
|
||||||
ERROR
|
ERROR
|
||||||
|
@ -212,14 +209,12 @@ public class AxolotlService {
|
||||||
|
|
||||||
private Set<XmppAxolotlSession> findOwnSessions() {
|
private Set<XmppAxolotlSession> findOwnSessions() {
|
||||||
AxolotlAddress ownAddress = getAddressForJid(account.getJid().toBareJid());
|
AxolotlAddress ownAddress = getAddressForJid(account.getJid().toBareJid());
|
||||||
Set<XmppAxolotlSession> ownDeviceSessions = new HashSet<>(this.sessions.getAll(ownAddress).values());
|
return new HashSet<>(this.sessions.getAll(ownAddress).values());
|
||||||
return ownDeviceSessions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set<XmppAxolotlSession> findSessionsforContact(Contact contact) {
|
private Set<XmppAxolotlSession> findSessionsforContact(Contact contact) {
|
||||||
AxolotlAddress contactAddress = getAddressForJid(contact.getJid());
|
AxolotlAddress contactAddress = getAddressForJid(contact.getJid());
|
||||||
Set<XmppAxolotlSession> sessions = new HashSet<>(this.sessions.getAll(contactAddress).values());
|
return new HashSet<>(this.sessions.getAll(contactAddress).values());
|
||||||
return sessions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<String> getFingerprintsForOwnSessions() {
|
public Set<String> getFingerprintsForOwnSessions() {
|
||||||
|
@ -509,10 +504,8 @@ public class AxolotlService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isContactAxolotlCapable(Contact contact) {
|
public boolean isContactAxolotlCapable(Contact contact) {
|
||||||
|
|
||||||
Jid jid = contact.getJid().toBareJid();
|
Jid jid = contact.getJid().toBareJid();
|
||||||
AxolotlAddress address = new AxolotlAddress(jid.toString(), 0);
|
return hasAny(contact) ||
|
||||||
return sessions.hasAny(address) ||
|
|
||||||
(deviceIds.containsKey(jid) && !deviceIds.get(jid).isEmpty());
|
(deviceIds.containsKey(jid) && !deviceIds.get(jid).isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,7 +789,7 @@ public class AxolotlService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public XmppAxolotlMessage.XmppAxolotlKeyTransportMessage processReceivingKeyTransportMessage(XmppAxolotlMessage message) {
|
public XmppAxolotlMessage.XmppAxolotlKeyTransportMessage processReceivingKeyTransportMessage(XmppAxolotlMessage message) {
|
||||||
XmppAxolotlMessage.XmppAxolotlKeyTransportMessage keyTransportMessage = null;
|
XmppAxolotlMessage.XmppAxolotlKeyTransportMessage keyTransportMessage;
|
||||||
|
|
||||||
XmppAxolotlSession session = getReceivingSession(message);
|
XmppAxolotlSession session = getReceivingSession(message);
|
||||||
keyTransportMessage = message.getParameters(session, getOwnDeviceId());
|
keyTransportMessage = message.getParameters(session, getOwnDeviceId());
|
||||||
|
|
|
@ -88,7 +88,6 @@ public class SQLiteAxolotlStore implements AxolotlStore {
|
||||||
// --------------------------------------
|
// --------------------------------------
|
||||||
|
|
||||||
private IdentityKeyPair loadIdentityKeyPair() {
|
private IdentityKeyPair loadIdentityKeyPair() {
|
||||||
String ownName = account.getJid().toBareJid().toString();
|
|
||||||
IdentityKeyPair ownKey = mXmppConnectionService.databaseBackend.loadOwnIdentityKeyPair(account);
|
IdentityKeyPair ownKey = mXmppConnectionService.databaseBackend.loadOwnIdentityKeyPair(account);
|
||||||
|
|
||||||
if (ownKey != null) {
|
if (ownKey != null) {
|
||||||
|
|
Loading…
Reference in a new issue