mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-31 14:06:10 +00:00
committed by
Moxie Marlinspike
parent
b7badec752
commit
0b62cf372b
@@ -79,7 +79,7 @@ public class VideoSlide extends Slide {
|
||||
PduPart part = new PduPart();
|
||||
ContentResolver resolver = context.getContentResolver();
|
||||
Cursor cursor = null;
|
||||
|
||||
|
||||
try {
|
||||
cursor = resolver.query(uri, new String[] {MediaStore.Video.Media.MIME_TYPE}, null, null, null);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
@@ -90,14 +90,14 @@ public class VideoSlide extends Slide {
|
||||
if (cursor != null)
|
||||
cursor.close();
|
||||
}
|
||||
|
||||
|
||||
if (getMediaSize(context, uri) > MAX_MESSAGE_SIZE)
|
||||
throw new MediaTooLargeException("Video exceeds maximum message size.");
|
||||
|
||||
|
||||
part.setDataUri(uri);
|
||||
part.setContentId((System.currentTimeMillis()+"").getBytes());
|
||||
part.setName(("Video" + System.currentTimeMillis()).getBytes());
|
||||
|
||||
|
||||
return part;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user