mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 09:42:17 -05:00
further improvment trying to deal with large images
This commit is contained in:
parent
0de9d57420
commit
6d90a5cd57
@ -135,7 +135,12 @@ public class FileBackend {
|
||||
throw new ImageCopyException(
|
||||
R.string.error_security_exception_during_image_copy);
|
||||
} catch (OutOfMemoryError e) {
|
||||
return copyImageToPrivateStorage(message, image, sampleSize++);
|
||||
++sampleSize;
|
||||
if (sampleSize<=3) {
|
||||
return copyImageToPrivateStorage(message, image, sampleSize);
|
||||
} else {
|
||||
throw new ImageCopyException(R.string.error_out_of_memory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user