Pass recipient ids, not recipient objects

Fixes #2233
// FREEBIE
This commit is contained in:
Jake McGinty
2014-12-17 18:14:19 -08:00
parent 60a343120d
commit e8b947dfde
16 changed files with 58 additions and 113 deletions

View File

@@ -41,6 +41,7 @@ import org.thoughtcrime.securesms.database.PushDatabase;
import org.thoughtcrime.securesms.jobs.PushDecryptJob;
import org.thoughtcrime.securesms.jobs.SmsDecryptJob;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.RecipientFactory;
import org.thoughtcrime.securesms.sms.IncomingIdentityUpdateMessage;
import org.thoughtcrime.securesms.sms.IncomingKeyExchangeMessage;
import org.thoughtcrime.securesms.sms.IncomingPreKeyBundleMessage;
@@ -123,7 +124,7 @@ public class ReceiveKeyActivity extends Activity {
@Override
public void onClick(View widget) {
Intent intent = new Intent(ReceiveKeyActivity.this, VerifyIdentityActivity.class);
intent.putExtra("recipient", recipient);
intent.putExtra("recipient", recipient.getRecipientId());
intent.putExtra("master_secret", masterSecret);
intent.putExtra("remote_identity", new IdentityKeyParcelable(identityKey));
startActivity(intent);
@@ -167,7 +168,7 @@ public class ReceiveKeyActivity extends Activity {
this.descriptionText = (TextView) findViewById(R.id.description_text);
this.confirmButton = (Button) findViewById(R.id.ok_button);
this.cancelButton = (Button) findViewById(R.id.cancel_button);
this.recipient = getIntent().getParcelableExtra("recipient");
this.recipient = RecipientFactory.getRecipientForId(this, getIntent().getLongExtra("recipient", -1), true);
this.recipientDeviceId = getIntent().getIntExtra("recipient_device_id", -1);
this.messageId = getIntent().getLongExtra("message_id", -1);
this.masterSecret = getIntent().getParcelableExtra("master_secret");