diff options
author | Mike Beattie <mike@ethernal.org> | 2012-09-18 23:46:17 +1200 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2012-09-18 23:46:17 +1200 |
commit | c058ec2d6070458a0b7d3ef56041e985412ee565 (patch) | |
tree | d5b7c9005e2419c71262c8ca8b43892b225a4f9d /altosui/AltosUIPreferencesBackend.java | |
parent | 36e684724e327dbd4319411ef0602fafb4d0c073 (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 'altosui/AltosUIPreferencesBackend.java')
-rw-r--r-- | altosui/AltosUIPreferencesBackend.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/altosui/AltosUIPreferencesBackend.java b/altosui/AltosUIPreferencesBackend.java index 210dcb8b..3131fd32 100644 --- a/altosui/AltosUIPreferencesBackend.java +++ b/altosui/AltosUIPreferencesBackend.java @@ -17,8 +17,10 @@ package altosui; +import java.io.File; import java.util.prefs.*; import org.altusmetrum.AltosLib.*; +import javax.swing.filechooser.FileSystemView; public class AltosUIPreferencesBackend implements AltosPreferencesBackend { @@ -92,4 +94,8 @@ public class AltosUIPreferencesBackend implements AltosPreferencesBackend { } } + public File homeDirectory() { + /* Use the file system view default directory */ + return FileSystemView.getFileSystemView().getDefaultDirectory(); + } } |