diff options
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/ImportExportActivity.java | 7 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/ImportExportActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/ImportExportActivity.java index 862420325..4d36e86de 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/ImportExportActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/ImportExportActivity.java @@ -30,6 +30,7 @@ import java.nio.channels.FileChannel; public class ImportExportActivity extends AppCompatActivity { private static final int REQUEST_CODE_RESTORE = 43; private static final int REQUEST_CODE_BACKUP_DOCUMENT = 44; + private static final String EXPORT_FILENAME = "AntennaPodBackup.db"; @Override protected void onCreate(Bundle savedInstanceState) { @@ -62,13 +63,13 @@ public class ImportExportActivity extends AppCompatActivity { Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT) .addCategory(Intent.CATEGORY_OPENABLE) .setType("application/x-sqlite3") - .putExtra(Intent.EXTRA_TITLE, "AntennaPodBackup.db"); + .putExtra(Intent.EXTRA_TITLE, EXPORT_FILENAME); startActivityForResult(intent, REQUEST_CODE_BACKUP_DOCUMENT); } else { try { File sd = Environment.getExternalStorageDirectory(); - File backupDB = new File(sd, "AntennaPodBackup.db"); + File backupDB = new File(sd, EXPORT_FILENAME); writeBackupTo(new FileOutputStream(backupDB)); } catch (Exception e) { e.printStackTrace(); @@ -78,7 +79,7 @@ public class ImportExportActivity extends AppCompatActivity { } private void restore() { - if(Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 19) { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); intent.setType("*/*"); startActivityForResult(intent, REQUEST_CODE_RESTORE); diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 6772c0205..2ee295997 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -667,7 +667,7 @@ <string name="label_import">Import</string> <string name="label_export">Export</string> <string name="import_select_file">Select file to import</string> - <string name="export_ok">Export successful. The database was written to the sd card.</string> + <string name="export_ok">Export successful. The database was written to the SD card.</string> <string name="import_ok">Import successful.\n\nPlease press OK to restart AntennaPod</string> <!-- Casting --> |