Check storage space on logging

This commit is contained in:
M66B
2021-01-25 10:05:22 +01:00
parent ef2fcf5e33
commit 6bf6cb1d84
3 changed files with 13 additions and 3 deletions

View File

@@ -124,7 +124,6 @@ public class MessageHelper {
private static final long ATTACHMENT_PROGRESS_UPDATE = 1500L; // milliseconds
private static final int MAX_META_EXCERPT = 1024; // characters
private static final int FORMAT_FLOWED_LINE_LENGTH = 72;
private static final long MIN_REQUIRED_SPACE = 250 * 1024L * 1024L;
private static final List<Charset> CHARSET16 = Collections.unmodifiableList(Arrays.asList(
StandardCharsets.UTF_16,
@@ -801,7 +800,7 @@ public class MessageHelper {
MessageHelper(MimeMessage message, Context context) throws IOException {
long cake = Helper.getAvailableStorageSpace();
if (cake < MIN_REQUIRED_SPACE)
if (cake < Helper.MIN_REQUIRED_SPACE)
throw new IOException(context.getString(R.string.app_cake));
if (cacheDir == null)
cacheDir = context.getCacheDir();