From 9814442de46719e6610938bc863644adaee059b3 Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 4 Feb 2015 21:16:08 +0100 Subject: [PATCH] Extract constant for default file name --- .../java/com/fsck/k9/ui/messageview/DownloadImageTask.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java b/k9mail/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java index da6122219..68eeab3f0 100644 --- a/k9mail/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java +++ b/k9mail/src/main/java/com/fsck/k9/ui/messageview/DownloadImageTask.java @@ -30,6 +30,8 @@ class DownloadImageTask extends AsyncTask { }; private static final int DISPLAY_NAME_INDEX = 1; + private static final String DEFAULT_FILE_NAME = "saved_image"; + private final Context context; @@ -61,7 +63,7 @@ class DownloadImageTask extends AsyncTask { filename = UrlEncodingHelper.decodeUtf8(path.substring(start + 1)); } else { // Use a dummy filename if necessary - filename = "saved_image"; + filename = DEFAULT_FILE_NAME; } // Get the MIME type if we couldn't find a file extension @@ -86,7 +88,7 @@ class DownloadImageTask extends AsyncTask { // Use a dummy filename if necessary if (filename == null) { - filename = "saved_image"; + filename = DEFAULT_FILE_NAME; } // Get the MIME type if we couldn't find a file extension