Revert "Instant Video Playback UI"

This reverts commit f8283acfae.
This commit is contained in:
Alex Hart
2023-09-22 16:13:19 -03:00
parent 15c6c372ba
commit 45583ea469
25 changed files with 399 additions and 856 deletions

View File

@@ -176,6 +176,5 @@ public abstract class SignalServiceAttachment {
* @param progress The amount that has been transmitted/received in bytes thus far
*/
public void onAttachmentProgress(long total, long progress);
boolean shouldCancel();
}
}

View File

@@ -1445,7 +1445,7 @@ public class PushServiceSocket {
}
}
private void downloadFromCdn(File destination, int cdnNumber, String path, long maxSizeBytes, ProgressListener listener)
private void downloadFromCdn(File destination, int cdnNumber, String path, long maxSizeBytes, ProgressListener listener)
throws IOException, MissingConfigurationException
{
try (FileOutputStream outputStream = new FileOutputStream(destination, true)) {
@@ -1502,9 +1502,6 @@ public class PushServiceSocket {
if (listener != null) {
listener.onAttachmentProgress(body.contentLength() + offset, totalRead);
if (listener.shouldCancel()) {
call.cancel();
}
}
}
} else if (response.code() == 416) {

View File

@@ -3,7 +3,6 @@ package org.whispersystems.signalservice.internal.push.http;
import org.junit.Test;
import org.whispersystems.signalservice.api.crypto.AttachmentCipherOutputStream;
import org.whispersystems.signalservice.api.crypto.AttachmentCipherStreamUtil;
import org.whispersystems.signalservice.api.messages.SignalServiceAttachment;
import org.whispersystems.signalservice.internal.util.Util;
import java.io.ByteArrayInputStream;
@@ -71,15 +70,6 @@ public class DigestingRequestBodyTest {
}
private DigestingRequestBody getBody(long contentStart) {
return new DigestingRequestBody(new ByteArrayInputStream(input), outputStreamFactory, "application/octet", CONTENT_LENGTH, new SignalServiceAttachment.ProgressListener() {
@Override
public void onAttachmentProgress(long total, long progress) {
// no-op
}
@Override public boolean shouldCancel() {
return false;
}
}, () -> false, contentStart);
return new DigestingRequestBody(new ByteArrayInputStream(input), outputStreamFactory, "application/octet", CONTENT_LENGTH, (a, b) -> {}, () -> false, contentStart);
}
}