Improve logging around attachment compression failures.

This commit is contained in:
Greyson Parrelli
2022-09-13 09:44:06 -04:00
parent a340ebf74a
commit 6417f5cce0
2 changed files with 13 additions and 1 deletions

View File

@@ -289,7 +289,7 @@ public class MessageSender {
final long threadId,
final SmsDatabase.InsertListener insertListener)
{
Log.i(TAG, "Sending media message with pre-uploads to " + message.getRecipient().getId() + ", thread: " + threadId);
Log.i(TAG, "Sending media message with pre-uploads to " + message.getRecipient().getId() + ", thread: " + threadId + ", pre-uploads: " + preUploadResults);
Preconditions.checkArgument(message.getAttachments().isEmpty(), "If the media is pre-uploaded, there should be no attachments on the message.");
try {
@@ -807,6 +807,11 @@ public class MessageSender {
ParcelUtil.writeStringCollection(dest, jobIds);
dest.writeParcelable(media, flags);
}
@Override
public @NonNull String toString() {
return "{ID: " + attachmentId.getRowId() + ", URI: " + media.getUri() + ", Jobs: " + jobIds.stream().map(j -> "JOB::" + j).collect(Collectors.toList()) + "}";
}
}
public enum MessageSentEvent {