summaryrefslogtreecommitdiff
path: root/altoslib/AltosPreferences.java
diff options
context:
space:
mode:
authorMike Beattie <mike@ethernal.org>2012-09-18 23:46:17 +1200
committerMike Beattie <mike@ethernal.org>2012-09-18 23:46:17 +1200
commitc058ec2d6070458a0b7d3ef56041e985412ee565 (patch)
treed5b7c9005e2419c71262c8ca8b43892b225a4f9d /altoslib/AltosPreferences.java
parent36e684724e327dbd4319411ef0602fafb4d0c073 (diff)
altos{lib,ui,droid}: move OS specific code out of altoslib
This is to allow the usage of AltosLog on Android - no swing, so we need to push the "home directory" code used to pick a default telemetry logging path - using the PreferencesBackend interface for now. Signed-off-by: Mike Beattie <mike@ethernal.org>
Diffstat (limited to 'altoslib/AltosPreferences.java')
-rw-r--r--altoslib/AltosPreferences.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/altoslib/AltosPreferences.java b/altoslib/AltosPreferences.java
index a82ea3f6..47196d6e 100644
--- a/altoslib/AltosPreferences.java
+++ b/altoslib/AltosPreferences.java
@@ -19,7 +19,6 @@ package org.altusmetrum.AltosLib;
import java.io.*;
import java.util.*;
-import javax.swing.filechooser.FileSystemView;
public class AltosPreferences {
public static AltosPreferencesBackend backend = null;
@@ -145,8 +144,7 @@ public class AltosPreferences {
if (logdir_string != null)
logdir = new File(logdir_string);
else {
- /* Use the file system view default directory */
- logdir = new File(FileSystemView.getFileSystemView().getDefaultDirectory(), logdirName);
+ logdir = new File(backend.homeDirectory(), logdirName);
if (!logdir.exists())
logdir.mkdirs();
}