diff options
author | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-11-06 19:58:12 +0100 |
---|---|---|
committer | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-11-06 19:58:12 +0100 |
commit | 4d6a78b0058deb738e53593cda84c18b31ab0010 (patch) | |
tree | 79a79161c6b80267d2838c9bab5bb27021b905c9 /src/main | |
parent | 019e673ce78f241717a1da97482ff1ec142b2487 (diff) |
use variable for app directory in FileBackend
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/FileBackend.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index 5f66850e3..17e139c59 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -79,6 +79,7 @@ public class FileBackend { private static final SimpleDateFormat fileDateFormat = new SimpleDateFormat("yyyyMMdd_HHmmssSSS", Locale.US); private static final String FILE_PROVIDER = ".files"; + private static final String APP_DIRECTORY = "Pix-Art Messenger"; private XmppConnectionService mXmppConnectionService; @@ -315,26 +316,26 @@ public class FileBackend { public static String getConversationsDirectory(final String type) { if (type.equalsIgnoreCase("null")) { - return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "Pix-Art Messenger" + File.separator; + return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + APP_DIRECTORY + File.separator; } else { - return getAppMediaDirectory() + "Pix-Art Messenger" + " " + type + File.separator; + return getAppMediaDirectory() + APP_DIRECTORY + " " + type + File.separator; } } public static String getAppMediaDirectory() { - return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "Pix-Art Messenger" + File.separator + "Media" + File.separator; + return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + APP_DIRECTORY + File.separator + "Media" + File.separator; } public static String getBackupDirectory() { - return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "Pix-Art Messenger" + File.separator + "Database" + File.separator; + return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + APP_DIRECTORY + File.separator + "Database" + File.separator; } public static String getAppLogsDirectory() { - return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "Pix-Art Messenger" + File.separator + "Chats" + File.separator; + return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + APP_DIRECTORY + File.separator + "Chats" + File.separator; } public static String getAppUpdateDirectory() { - return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "Pix-Art Messenger" + File.separator + "Update" + File.separator; + return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + APP_DIRECTORY + File.separator + "Update" + File.separator; } private Bitmap resize(final Bitmap originalBitmap, int size) throws IOException { |