Merge pull request #14 from LadyViktoria/master

typo in import export
This commit is contained in:
Milos Kozak 2016-07-04 09:01:36 +02:00 committed by GitHub
commit 832b08043a

View file

@ -1,5 +1,6 @@
package info.nightscout.utils;
import android.Manifest;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@ -25,10 +26,12 @@ import info.nightscout.androidaps.R;
/**
* Created by mike on 03.07.2016.
*/
public class ImportExportPrefs {
static File path = new File(Environment.getExternalStorageDirectory().toString());
static final File file = new File(path, MainApp.resources.getString(R.string.app_name) + "Preferences");
//exports shared Preferences
public static void exportSharedPreferences(final Context c) {
@ -48,7 +51,10 @@ public class ImportExportPrefs {
pw.close();
fw.close();
ToastUtils.showToastInUiThread(c, MainApp.resources.getString(R.string.exported));
} catch (Exception e) {
} catch (FileNotFoundException e) {
ToastUtils.showToastInUiThread(c, MainApp.resources.getString(R.string.filenotfound) + " " + file);
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}