mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Improve logging around attachment compression failures.
This commit is contained in:
@@ -9,7 +9,9 @@ import androidx.annotation.Nullable;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.mms.GlideApp;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -17,6 +19,8 @@ import java.util.concurrent.ExecutionException;
|
||||
|
||||
public final class ImageCompressionUtil {
|
||||
|
||||
private static final String TAG = Log.tag(ImageCompressionUtil.class);
|
||||
|
||||
private ImageCompressionUtil () {}
|
||||
|
||||
/**
|
||||
@@ -63,6 +67,9 @@ public final class ImageCompressionUtil {
|
||||
.submit(maxDimension, maxDimension)
|
||||
.get();
|
||||
} catch (ExecutionException | InterruptedException e) {
|
||||
if (e.getCause() instanceof GlideException) {
|
||||
((GlideException) e.getCause()).logRootCauses(TAG);
|
||||
}
|
||||
throw new BitmapDecodingException(e);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user