package de.thedevstack.conversationsplus.crypto.axolotl; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import org.whispersystems.libaxolotl.AxolotlAddress; import org.whispersystems.libaxolotl.IdentityKey; import org.whispersystems.libaxolotl.state.PreKeyRecord; import org.whispersystems.libaxolotl.state.SignedPreKeyRecord; import java.security.cert.X509Certificate; import java.util.Collections; import java.util.List; import java.util.Set; import de.thedevstack.conversationsplus.entities.Account; import de.thedevstack.conversationsplus.entities.Contact; import de.thedevstack.conversationsplus.entities.Conversation; import de.thedevstack.conversationsplus.entities.Message; import de.thedevstack.conversationsplus.xmpp.jid.Jid; /** * Axolotl Service Stub implementation to avoid axolotl usage. */ public class AxolotlServiceStub implements AxolotlService { @Override public String getOwnFingerprint() { return null; } @Override public Set getKeysWithTrust(XmppAxolotlSession.Trust trust) { return Collections.emptySet(); } @Override public Set getFingerprintsForOwnSessions() { return Collections.emptySet(); } @Override public Set getFingerprintsForContact(Contact contact) { return Collections.emptySet(); } @Override public boolean isPepBroken() { return true; } @Override public void regenerateKeys(boolean wipeOther) { } @Override public int getOwnDeviceId() { return 0; } @Override public Set getOwnDeviceIds() { return Collections.emptySet(); } @Override public void registerDevices(Jid jid, @NonNull Set deviceIds) { } @Override public void wipeOtherPepDevices() { } @Override public void purgeKey(String fingerprint) { } @Override public void publishOwnDeviceIdIfNeeded() { } @Override public void publishOwnDeviceId(Set deviceIds) { } @Override public void publishDeviceVerificationAndBundle(SignedPreKeyRecord signedPreKeyRecord, Set preKeyRecords, boolean announceAfter, boolean wipe) { } @Override public void publishBundlesIfNeeded(boolean announce, boolean wipe) { } @Override public XmppAxolotlSession.Trust getFingerprintTrust(String fingerprint) { return XmppAxolotlSession.Trust.TRUSTED; } @Override public X509Certificate getFingerprintCertificate(String fingerprint) { return null; } @Override public void setFingerprintTrust(String fingerprint, XmppAxolotlSession.Trust trust) { } @Override public Set findDevicesWithoutSession(Conversation conversation) { return Collections.emptySet(); } @Override public boolean createSessionsIfNeeded(Conversation conversation) { return false; } @Override public boolean trustedSessionVerified(Conversation conversation) { return false; } @Nullable @Override public XmppAxolotlMessage encrypt(Message message) { return null; } @Override public void preparePayloadMessage(Message message, boolean delay) { } @Override public XmppAxolotlMessage fetchAxolotlMessageFromCache(Message message) { return null; } @Override public XmppAxolotlMessage.XmppAxolotlPlaintextMessage processReceivingPayloadMessage(XmppAxolotlMessage message) { return null; } @Override public XmppAxolotlMessage.XmppAxolotlKeyTransportMessage processReceivingKeyTransportMessage(XmppAxolotlMessage message) { return null; } @Override public boolean fetchMapHasErrors(List jids) { return false; } @Override public Set getKeysWithTrust(XmppAxolotlSession.Trust trust, Jid jid) { return Collections.emptySet(); } @Override public Set getKeysWithTrust(XmppAxolotlSession.Trust trust, List jids) { return Collections.emptySet(); } @Override public long getNumTrustedKeys(Jid jid) { return 0; } @Override public boolean anyTargetHasNoTrustedKeys(List jids) { return false; } @Override public boolean isConversationAxolotlCapable(Conversation conversation) { return false; } @Override public List getCryptoTargets(Conversation conversation) { return Collections.emptyList(); } @Override public boolean hasPendingKeyFetches(Account account, List jids) { return false; } @Override public void prepareKeyTransportMessage(Conversation conversation, OnMessageCreatedCallback onMessageCreatedCallback) { } @Override public void onAdvancedStreamFeaturesAvailable(Account account) { } @Override public void resetBrokenness() { } }