mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Upload large backup attachments using a foreground service.
This commit is contained in:
@@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.events;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.thoughtcrime.securesms.attachments.Attachment;
|
||||
import org.whispersystems.signalservice.api.messages.AttachmentTransferProgress;
|
||||
|
||||
public final class PartProgressEvent {
|
||||
|
||||
@@ -22,4 +23,11 @@ public final class PartProgressEvent {
|
||||
this.total = total;
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
public PartProgressEvent(@NonNull Attachment attachment, @NonNull Type type, @NonNull AttachmentTransferProgress progress) {
|
||||
this.attachment = attachment;
|
||||
this.type = type;
|
||||
this.total = progress.getTotal().getInWholeBytes();
|
||||
this.progress = progress.getTransmitted().getInWholeBytes();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user