mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-07 00:03:44 +01:00
Support for receiving arbitrary attachment types
// FREEBIE
This commit is contained in:
1 parent
c69efbffd2
commit
f67eb5f9f3
60 files changed
+1251
-423
No files matched your search
+2
-2
@@ -38,7 +38,7 @@ public class AttachmentDatabaseTest extends TextSecureTestCase {
|
||||
final AttachmentId attachmentId = new AttachmentId(ROW_ID, UNIQUE_ID);
|
||||
|
||||
DatabaseAttachment mockAttachment = getMockAttachment("x/x");
|
||||
when(database.getAttachment(attachmentId)).thenReturn(mockAttachment);
|
||||
when(database.getAttachment(null, attachmentId)).thenReturn(mockAttachment);
|
||||
|
||||
InputStream mockInputStream = mock(InputStream.class);
|
||||
doReturn(mockInputStream).when(database).getDataStream(any(MasterSecret.class), any(AttachmentId.class), eq("thumbnail"));
|
||||
@@ -52,7 +52,7 @@ public class AttachmentDatabaseTest extends TextSecureTestCase {
|
||||
final AttachmentId attachmentId = new AttachmentId(ROW_ID, UNIQUE_ID);
|
||||
|
||||
DatabaseAttachment mockAttachment = getMockAttachment("image/png");
|
||||
when(database.getAttachment(attachmentId)).thenReturn(mockAttachment);
|
||||
when(database.getAttachment(null, attachmentId)).thenReturn(mockAttachment);
|
||||
|
||||
doReturn(null).when(database).getDataStream(any(MasterSecret.class), any(AttachmentId.class), eq("thumbnail"));
|
||||
doNothing().when(database).updateAttachmentThumbnail(any(MasterSecret.class), any(AttachmentId.class), any(InputStream.class), anyFloat());
|
||||
|
||||
Reference in new issue
Block a user