mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Clean up AttachmentTable schema.
This commit is contained in:
committed by
Alex Hart
parent
62b142cdeb
commit
fe39b5e4e2
@@ -58,14 +58,14 @@ class PartDataSource implements DataSource {
|
||||
|
||||
final boolean hasIncrementalDigest = attachment.getIncrementalDigest() != null;
|
||||
final boolean inProgress = attachment.isInProgress();
|
||||
final String attachmentKey = attachment.key;
|
||||
final String attachmentKey = attachment.remoteKey;
|
||||
final boolean hasData = attachment.hasData;
|
||||
|
||||
if (inProgress && !hasData && hasIncrementalDigest && attachmentKey != null && FeatureFlags.instantVideoPlayback()) {
|
||||
final byte[] decode = Base64.decode(attachmentKey);
|
||||
final File transferFile = attachmentDatabase.getOrCreateTransferFile(attachment.attachmentId);
|
||||
try {
|
||||
this.inputStream = AttachmentCipherInputStream.createForAttachment(transferFile, attachment.size, decode, attachment.digest, attachment.getIncrementalDigest(), attachment.incrementalMacChunkSize);
|
||||
this.inputStream = AttachmentCipherInputStream.createForAttachment(transferFile, attachment.size, decode, attachment.remoteDigest, attachment.getIncrementalDigest(), attachment.incrementalMacChunkSize);
|
||||
|
||||
long skipped = 0;
|
||||
while (skipped < dataSpec.position) {
|
||||
|
||||
Reference in New Issue
Block a user