further improvment trying to deal with large images

This commit is contained in:
Daniel Gultsch 2014-05-21 20:27:53 +02:00
parent 0de9d57420
commit 6d90a5cd57

View File

@ -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);
}
}
}