Remove unused code

This commit is contained in:
AsamK 2023-05-21 11:18:18 +02:00
parent a754eb6faf
commit 8a0005d900
4 changed files with 1 additions and 31 deletions

View file

@ -34,7 +34,6 @@ import org.asamk.signal.manager.groups.GroupNotFoundException;
import org.asamk.signal.manager.groups.GroupSendingNotAllowedException; import org.asamk.signal.manager.groups.GroupSendingNotAllowedException;
import org.asamk.signal.manager.groups.LastGroupAdminException; import org.asamk.signal.manager.groups.LastGroupAdminException;
import org.asamk.signal.manager.groups.NotAGroupMemberException; import org.asamk.signal.manager.groups.NotAGroupMemberException;
import org.asamk.signal.manager.storage.recipients.Profile;
import org.whispersystems.signalservice.api.util.PhoneNumberFormatter; import org.whispersystems.signalservice.api.util.PhoneNumberFormatter;
import java.io.Closeable; import java.io.Closeable;
@ -104,8 +103,6 @@ public interface Manager extends Closeable {
void setRegistrationLockPin(Optional<String> pin) throws IOException, NotPrimaryDeviceException; void setRegistrationLockPin(Optional<String> pin) throws IOException, NotPrimaryDeviceException;
Profile getRecipientProfile(RecipientIdentifier.Single recipient) throws IOException, UnregisteredRecipientException;
List<Group> getGroups(); List<Group> getGroups();
SendGroupMessageResults quitGroup( SendGroupMessageResults quitGroup(
@ -221,14 +218,12 @@ public interface Manager extends Closeable {
/** /**
* Receive new messages from server, returns if no new message arrive in a timespan of timeout. * Receive new messages from server, returns if no new message arrive in a timespan of timeout.
*/ */
public void receiveMessages( void receiveMessages(
Optional<Duration> timeout, Optional<Integer> maxMessages, ReceiveMessageHandler handler Optional<Duration> timeout, Optional<Integer> maxMessages, ReceiveMessageHandler handler
) throws IOException, AlreadyReceivingException; ) throws IOException, AlreadyReceivingException;
void setReceiveConfig(ReceiveConfig receiveConfig); void setReceiveConfig(ReceiveConfig receiveConfig);
boolean hasCaughtUpWithOldMessages();
boolean isContactBlocked(RecipientIdentifier.Single recipient); boolean isContactBlocked(RecipientIdentifier.Single recipient);
void sendContacts() throws IOException; void sendContacts() throws IOException;

View file

@ -377,11 +377,6 @@ class ManagerImpl implements Manager {
context.getPreKeyHelper().refreshPreKeys(); context.getPreKeyHelper().refreshPreKeys();
} }
@Override
public Profile getRecipientProfile(RecipientIdentifier.Single recipient) throws UnregisteredRecipientException {
return context.getProfileHelper().getRecipientProfile(context.getRecipientHelper().resolveRecipient(recipient));
}
@Override @Override
public List<Group> getGroups() { public List<Group> getGroups() {
return account.getGroupStore().getGroups().stream().map(this::toGroup).toList(); return account.getGroupStore().getGroups().stream().map(this::toGroup).toList();
@ -1053,11 +1048,6 @@ class ManagerImpl implements Manager {
context.getReceiveHelper().setReceiveConfig(receiveConfig); context.getReceiveHelper().setReceiveConfig(receiveConfig);
} }
@Override
public boolean hasCaughtUpWithOldMessages() {
return context.getReceiveHelper().hasCaughtUpWithOldMessages();
}
@Override @Override
public boolean isContactBlocked(final RecipientIdentifier.Single recipient) { public boolean isContactBlocked(final RecipientIdentifier.Single recipient) {
final RecipientId recipientId; final RecipientId recipientId;

View file

@ -61,10 +61,6 @@ public class ReceiveHelper {
this.needsToRetryFailedMessages = needsToRetryFailedMessages; this.needsToRetryFailedMessages = needsToRetryFailedMessages;
} }
public boolean hasCaughtUpWithOldMessages() {
return hasCaughtUpWithOldMessages;
}
public void setAuthenticationFailureListener(final Callable authenticationFailureListener) { public void setAuthenticationFailureListener(final Callable authenticationFailureListener) {
this.authenticationFailureListener = authenticationFailureListener; this.authenticationFailureListener = authenticationFailureListener;
} }

View file

@ -38,7 +38,6 @@ import org.asamk.signal.manager.groups.GroupSendingNotAllowedException;
import org.asamk.signal.manager.groups.LastGroupAdminException; import org.asamk.signal.manager.groups.LastGroupAdminException;
import org.asamk.signal.manager.groups.NotAGroupMemberException; import org.asamk.signal.manager.groups.NotAGroupMemberException;
import org.asamk.signal.manager.storage.recipients.Contact; import org.asamk.signal.manager.storage.recipients.Contact;
import org.asamk.signal.manager.storage.recipients.Profile;
import org.freedesktop.dbus.DBusMap; import org.freedesktop.dbus.DBusMap;
import org.freedesktop.dbus.DBusPath; import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.connections.impl.DBusConnection; import org.freedesktop.dbus.connections.impl.DBusConnection;
@ -213,11 +212,6 @@ public class DbusManagerImpl implements Manager {
} }
} }
@Override
public Profile getRecipientProfile(final RecipientIdentifier.Single recipient) {
throw new UnsupportedOperationException();
}
@Override @Override
public List<Group> getGroups() { public List<Group> getGroups() {
final var groups = signal.listGroups(); final var groups = signal.listGroups();
@ -574,11 +568,6 @@ public class DbusManagerImpl implements Manager {
public void setReceiveConfig(final ReceiveConfig receiveConfig) { public void setReceiveConfig(final ReceiveConfig receiveConfig) {
} }
@Override
public boolean hasCaughtUpWithOldMessages() {
return true;
}
@Override @Override
public boolean isContactBlocked(final RecipientIdentifier.Single recipient) { public boolean isContactBlocked(final RecipientIdentifier.Single recipient) {
return signal.isContactBlocked(recipient.getIdentifier()); return signal.isContactBlocked(recipient.getIdentifier());