Skip to content
Snippets Groups Projects
Commit 61913fc5 authored by Peter Joseph De Jonckheere CESM2014's avatar Peter Joseph De Jonckheere CESM2014
Browse files

Small additional save fix

parent 93ba08cc
No related branches found
No related tags found
No related merge requests found
......@@ -125,9 +125,13 @@ public class SaveFile {
if (isExternalStorageMounted()) {
File dir = getDirectory(context);
if (dir.isDirectory()) {
File file = new File(dir.getAbsolutePath() + "NTYPELOG");
File file = new File(dir, "TYPELOG");
try {
if(!file.exists()) {
file.createNewFile();
}
if (file.isFile() & file.canRead()) {
try {
BufferedReader br = new BufferedReader(new FileReader(file));
sound = Integer.parseInt(br.readLine());
led = Integer.parseInt(br.readLine());
......@@ -149,13 +153,14 @@ public class SaveFile {
bw.newLine();
bw.write(vibration);
}
} catch (IOException e) {
}
} catch (IOException e) {
}
}
}
}
}
/* Checks if external storage is available */
private static boolean isExternalStorageMounted() {
return (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment