altoslib: Store saved state in version-independent format
[fw/altos] / altosdroid / src / org / altusmetrum / AltosDroid / AltosDroid.java
index 385348ea247ed439dbf4947c59ffb6b64eecfdb5..a62bf7fe0d051f818762dcfc02f1c301ca6d53c3 100644 (file)
@@ -825,9 +825,9 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener,
                }
        }
 
-       private void disconnectDevice() {
+       private void disconnectDevice(boolean remember) {
                try {
-                       mService.send(Message.obtain(null, TelemetryService.MSG_DISCONNECT, null));
+                       mService.send(Message.obtain(null, TelemetryService.MSG_DISCONNECT, (Boolean) remember));
                } catch (RemoteException e) {
                }
        }
@@ -978,11 +978,11 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener,
                case R.id.disconnect:
                        /* Disconnect the device
                         */
-                       disconnectDevice();
+                       disconnectDevice(false);
                        return true;
                case R.id.quit:
                        AltosDebug.debug("R.id.quit");
-                       disconnectDevice();
+                       disconnectDevice(true);
                        finish();
                        return true;
                case R.id.setup: