Javadocs, and some minor refactoring.

This commit is contained in:
Moxie Marlinspike
2014-04-24 12:28:38 -07:00
parent af45e5d544
commit 5a3c19fe3e
18 changed files with 333 additions and 46 deletions

View File

@@ -183,8 +183,8 @@ public class VerifyIdentityActivity extends KeyScanningActivity {
private IdentityKey getRemoteIdentityKey(MasterSecret masterSecret, Recipient recipient) {
SessionStore sessionStore = new TextSecureSessionStore(this, masterSecret);
SessionRecord record = sessionStore.get(recipient.getRecipientId(),
RecipientDevice.DEFAULT_DEVICE_ID);
SessionRecord record = sessionStore.load(recipient.getRecipientId(),
RecipientDevice.DEFAULT_DEVICE_ID);
if (record == null) {
return null;

View File

@@ -79,7 +79,7 @@ public class KeyExchangeInitiator {
Recipient recipient)
{
SessionStore sessionStore = new TextSecureSessionStore(context, masterSecret);
SessionRecord sessionRecord = sessionStore.get(recipient.getRecipientId(), RecipientDevice.DEFAULT_DEVICE_ID);
SessionRecord sessionRecord = sessionStore.load(recipient.getRecipientId(), RecipientDevice.DEFAULT_DEVICE_ID);
return sessionRecord.getSessionState().hasPendingPreKey();
}

View File

@@ -77,8 +77,8 @@ public class KeyExchangeProcessor {
}
public boolean isStale(KeyExchangeMessage message) {
SessionRecord sessionRecord = sessionStore.get(recipientDevice.getRecipientId(),
recipientDevice.getDeviceId());
SessionRecord sessionRecord = sessionStore.load(recipientDevice.getRecipientId(),
recipientDevice.getDeviceId());
return
message.isResponse() &&