mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-26 09:59:28 +00:00
Update signal-service to 2.5.9
// FREEBIE
This commit is contained in:
@@ -42,8 +42,8 @@ public class SignalProtocolStoreImpl implements SignalProtocolStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveIdentity(SignalProtocolAddress address, IdentityKey identityKey) {
|
||||
return identityKeyStore.saveIdentity(address, identityKey);
|
||||
public void saveIdentity(SignalProtocolAddress address, IdentityKey identityKey) {
|
||||
identityKeyStore.saveIdentity(address, identityKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,8 +42,8 @@ public class TextSecureIdentityKeyStore implements IdentityKeyStore {
|
||||
return TextSecurePreferences.getLocalRegistrationId(context);
|
||||
}
|
||||
|
||||
public boolean saveIdentity(SignalProtocolAddress address, IdentityKey identityKey,
|
||||
boolean blockingApproval, boolean nonBlockingApproval)
|
||||
public void saveIdentity(SignalProtocolAddress address, IdentityKey identityKey,
|
||||
boolean blockingApproval, boolean nonBlockingApproval)
|
||||
{
|
||||
synchronized (LOCK) {
|
||||
IdentityDatabase identityDatabase = DatabaseFactory.getIdentityDatabase(context);
|
||||
@@ -54,29 +54,27 @@ public class TextSecureIdentityKeyStore implements IdentityKeyStore {
|
||||
if (!identityRecord.isPresent()) {
|
||||
Log.w(TAG, "Saving new identity...");
|
||||
identityDatabase.saveIdentity(recipientId, identityKey, true, System.currentTimeMillis(), blockingApproval, nonBlockingApproval);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!identityRecord.get().getIdentityKey().equals(identityKey)) {
|
||||
Log.w(TAG, "Replacing existing identity...");
|
||||
identityDatabase.saveIdentity(recipientId, identityKey, false, System.currentTimeMillis(), blockingApproval, nonBlockingApproval);
|
||||
IdentityUtil.markIdentityUpdate(context, recipients.getPrimaryRecipient());
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isBlockingApprovalRequired(identityRecord.get()) || isNonBlockingApprovalRequired(identityRecord.get())) {
|
||||
Log.w(TAG, "Setting approval status...");
|
||||
identityDatabase.setApproval(recipientId, blockingApproval, nonBlockingApproval);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveIdentity(SignalProtocolAddress address, IdentityKey identityKey) {
|
||||
return saveIdentity(address, identityKey, !TextSecurePreferences.isSendingIdentityApprovalRequired(context), false);
|
||||
public void saveIdentity(SignalProtocolAddress address, IdentityKey identityKey) {
|
||||
saveIdentity(address, identityKey, !TextSecurePreferences.isSendingIdentityApprovalRequired(context), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user