Remove dead code.

This commit is contained in:
Moxie Marlinspike 2014-02-20 18:27:43 -08:00
parent 3ca25de034
commit 2026330f8a

View File

@ -20,15 +20,11 @@ public class IncomingMediaMessage {
private final PduHeaders headers; private final PduHeaders headers;
private final PduBody body; private final PduBody body;
private final String groupId; private final String groupId;
private final int groupAction;
private final String groupActionArguments;
public IncomingMediaMessage(RetrieveConf retreived) { public IncomingMediaMessage(RetrieveConf retreived) {
this.headers = retreived.getPduHeaders(); this.headers = retreived.getPduHeaders();
this.body = retreived.getBody(); this.body = retreived.getBody();
this.groupId = null; this.groupId = null;
this.groupAction = -1;
this.groupActionArguments = null;
} }
public IncomingMediaMessage(MasterSecret masterSecret, String localNumber, public IncomingMediaMessage(MasterSecret masterSecret, String localNumber,
@ -39,19 +35,16 @@ public class IncomingMediaMessage {
this.body = new PduBody(); this.body = new PduBody();
if (messageContent.hasGroup()) { if (messageContent.hasGroup()) {
this.groupId = GroupUtil.getEncodedId(messageContent.getGroup().getId().toByteArray()); this.groupId = GroupUtil.getEncodedId(messageContent.getGroup().getId().toByteArray());
this.groupAction = messageContent.getGroup().getType().getNumber();
this.groupActionArguments = GroupUtil.serializeArguments(messageContent.getGroup());
} else { } else {
this.groupId = null; this.groupId = null;
this.groupAction = -1;
this.groupActionArguments = null;
} }
this.headers.setEncodedStringValue(new EncodedStringValue(message.getSource()), PduHeaders.FROM); this.headers.setEncodedStringValue(new EncodedStringValue(message.getSource()), PduHeaders.FROM);
this.headers.appendEncodedStringValue(new EncodedStringValue(localNumber), PduHeaders.TO); this.headers.appendEncodedStringValue(new EncodedStringValue(localNumber), PduHeaders.TO);
this.headers.setLongInteger(message.getTimestampMillis() / 1000, PduHeaders.DATE); this.headers.setLongInteger(message.getTimestampMillis() / 1000, PduHeaders.DATE);
if (!org.whispersystems.textsecure.util.Util.isEmpty(messageContent.getBody())) { if (!org.whispersystems.textsecure.util.Util.isEmpty(messageContent.getBody())) {
PduPart text = new PduPart(); PduPart text = new PduPart();
text.setData(Util.toIsoBytes(messageContent.getBody())); text.setData(Util.toIsoBytes(messageContent.getBody()));
@ -97,12 +90,4 @@ public class IncomingMediaMessage {
(headers.getEncodedStringValues(PduHeaders.TO) != null && (headers.getEncodedStringValues(PduHeaders.TO) != null &&
headers.getEncodedStringValues(PduHeaders.TO).length > 1); headers.getEncodedStringValues(PduHeaders.TO).length > 1);
} }
public int getGroupAction() {
return groupAction;
}
public String getGroupActionArguments() {
return groupActionArguments;
}
} }