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(
|
throw new ImageCopyException(
|
||||||
R.string.error_security_exception_during_image_copy);
|
R.string.error_security_exception_during_image_copy);
|
||||||
} catch (OutOfMemoryError e) {
|
} 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