mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Treat SVGs as document attachments.
This commit is contained in:
committed by
Cody Henthorne
parent
4ae129d2af
commit
b94624fd5a
@@ -293,7 +293,7 @@ public class MediaUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
return contentType.startsWith("image/") ||
|
||||
return (contentType.startsWith("image/") && !contentType.equals("image/svg+xml")) ||
|
||||
contentType.equals(MediaStore.Images.Media.CONTENT_TYPE);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,10 @@ final class MemoryFileDescriptorProxy {
|
||||
try {
|
||||
InputStream inputStream = memoryFile.getInputStream();
|
||||
if(inputStream.skip(offset) != offset){
|
||||
if (offset > memoryFile.length()) {
|
||||
throw new ErrnoException("onRead", OsConstants.EIO);
|
||||
}
|
||||
|
||||
throw new AssertionError();
|
||||
}
|
||||
return inputStream.read(data, 0, size);
|
||||
|
||||
Reference in New Issue
Block a user