Store threshold as constant

This commit is contained in:
ameba23
2021-05-07 17:24:11 +02:00
parent d9fe8d962f
commit 7fb986ea9a
2 changed files with 12 additions and 9 deletions

View File

@@ -1,13 +1,16 @@
package org.briarproject.briar.remotewipe;
public interface RemoteWipeConstants {
// Group metadata keys
String GROUP_KEY_CONTACT_ID = "contactId";
String GROUP_KEY_WIPERS = "wipers";
String GROUP_KEY_RECEIVED_WIPE = "receivedWipe";
// Message metadata keys
String MSG_KEY_TIMESTAMP = "timestamp";
String MSG_KEY_MESSAGE_TYPE = "messageType";
String MSG_KEY_LOCAL = "local";
int THRESHOLD = 2;
// Group metadata keys
String GROUP_KEY_CONTACT_ID = "contactId";
String GROUP_KEY_WIPERS = "wipers";
String GROUP_KEY_RECEIVED_WIPE = "receivedWipe";
// Message metadata keys
String MSG_KEY_TIMESTAMP = "timestamp";
String MSG_KEY_MESSAGE_TYPE = "messageType";
String MSG_KEY_LOCAL = "local";
}

View File

@@ -51,6 +51,7 @@ import static org.briarproject.briar.remotewipe.RemoteWipeConstants.GROUP_KEY_WI
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_LOCAL;
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_MESSAGE_TYPE;
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_TIMESTAMP;
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.THRESHOLD;
public class RemoteWipeManagerImpl extends ConversationClientImpl
implements RemoteWipeManager, ContactManager.ContactHook,
@@ -63,7 +64,6 @@ public class RemoteWipeManagerImpl extends ConversationClientImpl
private final ContactManager contactManager;
private final MessageEncoder messageEncoder;
private final MessageParser messageParser;
private static int THRESHOLD = 2; // TODO
@Inject
protected RemoteWipeManagerImpl(