diff --git a/android/src/main/java/org/ligi/passandroid/model/AndroidSettings.java b/android/src/main/java/org/ligi/passandroid/model/AndroidSettings.java index 059c93e7..9cf2a824 100644 --- a/android/src/main/java/org/ligi/passandroid/model/AndroidSettings.java +++ b/android/src/main/java/org/ligi/passandroid/model/AndroidSettings.java @@ -41,7 +41,7 @@ public class AndroidSettings implements Settings { @Override public File getPassesDir() { - return new File(context.getFilesDir().getAbsolutePath() , "passes"); + return new File(context.getFilesDir().getAbsolutePath(), "passes"); } @Override @@ -51,8 +51,8 @@ public class AndroidSettings implements Settings { @Override - public String getShareDir() { - return Environment.getExternalStorageDirectory() + "/tmp/passbook_share_tmp/"; + public File getShareDir() { + return new File(Environment.getExternalStorageDirectory(), "tmp/passbook_share_tmp/"); } @Override diff --git a/android/src/main/java/org/ligi/passandroid/model/Settings.java b/android/src/main/java/org/ligi/passandroid/model/Settings.java index 9c204dc8..a78bf51b 100644 --- a/android/src/main/java/org/ligi/passandroid/model/Settings.java +++ b/android/src/main/java/org/ligi/passandroid/model/Settings.java @@ -13,7 +13,7 @@ public interface Settings { File getStateDir(); - String getShareDir(); + File getShareDir(); boolean isCondensedModeEnabled(); diff --git a/android/src/main/java/org/ligi/passandroid/ui/ExportProblemPassToLigiAndFinishTask.java b/android/src/main/java/org/ligi/passandroid/ui/ExportProblemPassToLigiAndFinishTask.java index f2c51be9..e7823cb7 100644 --- a/android/src/main/java/org/ligi/passandroid/ui/ExportProblemPassToLigiAndFinishTask.java +++ b/android/src/main/java/org/ligi/passandroid/ui/ExportProblemPassToLigiAndFinishTask.java @@ -10,7 +10,7 @@ class ExportProblemPassToLigiAndFinishTask extends PassExportTask { private final String reason; - public ExportProblemPassToLigiAndFinishTask(Activity activity, File path, String zip_path, String zip_fname, final String reason) { + public ExportProblemPassToLigiAndFinishTask(Activity activity, File path, File zip_path, String zip_fname, final String reason) { super(activity, path, zip_path, zip_fname, false); this.reason = reason; } diff --git a/android/src/main/java/org/ligi/passandroid/ui/PassExportTask.java b/android/src/main/java/org/ligi/passandroid/ui/PassExportTask.java index c2c4eb35..62a21026 100644 --- a/android/src/main/java/org/ligi/passandroid/ui/PassExportTask.java +++ b/android/src/main/java/org/ligi/passandroid/ui/PassExportTask.java @@ -22,11 +22,11 @@ class PassExportTask extends AsyncTask { public PassExportTask(final Activity activity, final File inputPath, - final String zipPath, + final File zipPath, final String zipFileName, final boolean share_after_export) { this.activity = activity; - passExporter = new PassExporter( inputPath, zipPath + "/" + zipFileName); + passExporter = new PassExporter( inputPath, new File(zipPath, zipFileName).getAbsolutePath()); this.share_after_export = share_after_export; progress_dialog = new ProgressDialog(activity); }