altosui: Re-add a couple of "unused" values
[fw/altos] / altosui / AltosUIPreferences.java
index 4ef9384d0ceb862a6f3c5a1efa41def1396b043a..f6ee7e06910d11f6a90edffdace729bca9206979 100644 (file)
@@ -45,8 +45,8 @@ public class AltosUIPreferences extends AltosPreferences {
        /* Serial debug */
        static boolean serial_debug;
 
-       public static void init(AltosUIPreferencesBackend in_backend) {
-               AltosPreferences.init(in_backend);
+       public static void init() {
+               AltosPreferences.init(new AltosUIPreferencesBackend());
 
                font_listeners = new LinkedList<AltosFontListener>();
 
@@ -59,6 +59,8 @@ public class AltosUIPreferences extends AltosPreferences {
                AltosLink.set_debug(serial_debug);
        }
 
+       static { init(); }
+
        static void set_component(Component in_component) {
                component = in_component;
        }
@@ -161,7 +163,7 @@ public class AltosUIPreferences extends AltosPreferences {
                }
        }
        public static void set_serial_debug(boolean new_serial_debug) {
-               AltosLink.set_debug(serial_debug);
+               AltosLink.set_debug(new_serial_debug);
                synchronized (backend) {
                        serial_debug = new_serial_debug;
                        backend.putBoolean(serialDebugPreference, serial_debug);