Unify - consistently return File not String

This commit is contained in:
ligi 2016-04-07 15:36:23 +02:00
parent 58ef1f46fe
commit 2a3bb7d8c1
4 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -13,7 +13,7 @@ public interface Settings {
File getStateDir();
String getShareDir();
File getShareDir();
boolean isCondensedModeEnabled();

View file

@ -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;
}

View file

@ -22,11 +22,11 @@ class PassExportTask extends AsyncTask<Void, Void, Void> {
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);
}