Fix build

This commit is contained in:
Moxie Marlinspike 2014-02-14 16:40:54 -08:00
parent 556b0dec1d
commit 7d3a2acb29
3 changed files with 6 additions and 4 deletions

View File

@ -21,7 +21,7 @@ import android.os.Parcelable;
import org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal; import org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal;
public class IncomingPushMessage implements PushMessage, Parcelable { public class IncomingPushMessage implements Parcelable {
public static final Parcelable.Creator<IncomingPushMessage> CREATOR = new Parcelable.Creator<IncomingPushMessage>() { public static final Parcelable.Creator<IncomingPushMessage> CREATOR = new Parcelable.Creator<IncomingPushMessage>() {
@Override @Override

View File

@ -18,7 +18,7 @@ package org.whispersystems.textsecure.push;
import org.whispersystems.textsecure.util.Base64; import org.whispersystems.textsecure.util.Base64;
public class OutgoingPushMessage implements PushMessage { public class OutgoingPushMessage {
private int type; private int type;
private int destinationDeviceId; private int destinationDeviceId;

View File

@ -61,6 +61,8 @@ import ws.com.google.android.mms.ContentType;
import ws.com.google.android.mms.pdu.PduBody; import ws.com.google.android.mms.pdu.PduBody;
import ws.com.google.android.mms.pdu.SendReq; import ws.com.google.android.mms.pdu.SendReq;
import static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal;
public class PushTransport extends BaseTransport { public class PushTransport extends BaseTransport {
private final Context context; private final Context context;
@ -315,9 +317,9 @@ public class PushTransport extends BaseTransport {
CiphertextMessage message = cipher.encrypt(plaintext); CiphertextMessage message = cipher.encrypt(plaintext);
if (message.getType() == CiphertextMessage.PREKEY_WHISPER_TYPE) { if (message.getType() == CiphertextMessage.PREKEY_WHISPER_TYPE) {
return new PushBody(OutgoingPushMessage.TYPE_MESSAGE_PREKEY_BUNDLE, message.serialize()); return new PushBody(IncomingPushMessageSignal.Type.PREKEY_BUNDLE_VALUE, message.serialize());
} else if (message.getType() == CiphertextMessage.CURRENT_WHISPER_TYPE) { } else if (message.getType() == CiphertextMessage.CURRENT_WHISPER_TYPE) {
return new PushBody(OutgoingPushMessage.TYPE_MESSAGE_CIPHERTEXT, message.serialize()); return new PushBody(IncomingPushMessageSignal.Type.CIPHERTEXT_VALUE, message.serialize());
} else { } else {
throw new AssertionError("Unknown ciphertext type: " + message.getType()); throw new AssertionError("Unknown ciphertext type: " + message.getType());
} }