mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-03 15:58:40 +00:00
Add small logging to attachment finalization process.
This commit is contained in:
@@ -38,6 +38,8 @@ import org.signal.core.util.concurrent.SettableFuture;
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.signal.glide.transforms.SignalDownsampleStrategy;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.attachments.Attachment;
|
||||
import org.thoughtcrime.securesms.attachments.DatabaseAttachment;
|
||||
import org.thoughtcrime.securesms.blurhash.BlurHash;
|
||||
import org.thoughtcrime.securesms.components.transfercontrols.TransferControlView;
|
||||
import org.thoughtcrime.securesms.database.AttachmentTable;
|
||||
@@ -404,9 +406,22 @@ public class ThumbnailView extends FrameLayout {
|
||||
return new SettableFuture<>(false);
|
||||
}
|
||||
|
||||
Log.i(TAG, "loading part with id " + slide.asAttachment().getUri()
|
||||
Attachment slideAttachment = slide.asAttachment();
|
||||
String id;
|
||||
if (slideAttachment instanceof DatabaseAttachment) {
|
||||
id = ((DatabaseAttachment) slideAttachment).attachmentId.serialize();
|
||||
} else {
|
||||
final Uri uri = slideAttachment.getUri();
|
||||
if (uri != null) {
|
||||
id = slideAttachment.getUri().toString();
|
||||
} else {
|
||||
id = slideAttachment.getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
|
||||
Log.i(TAG, "loading part with id " + id
|
||||
+ ", progress " + slide.getTransferState() + ", fast preflight id: " +
|
||||
slide.asAttachment().fastPreflightId);
|
||||
slideAttachment.fastPreflightId);
|
||||
|
||||
BlurHash previousBlurHash = this.slide != null ? this.slide.getPlaceholderBlur() : null;
|
||||
|
||||
|
||||
@@ -947,6 +947,8 @@ class AttachmentTable(
|
||||
.where("$ID = ?", attachmentId.id)
|
||||
.run()
|
||||
|
||||
Log.i(TAG, "[finalizeAttachmentAfterDownload] Finalized downloaded data for $attachmentId. (MessageId: $mmsId, $attachmentId)")
|
||||
|
||||
hashMatch != null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user