projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosdroid: start restoring from log data on startup
[fw/altos]
/
altosdroid
/
src
/
org
/
altusmetrum
/
AltosDroid
/
AltosDroid.java
diff --git
a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
index c9c38d9819a6e7ac798d3a12a800fdcf93dfe300..c94f36fda0d82a233f599d1212b2950e13fa8e55 100644
(file)
--- a/
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
+++ b/
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
@@
-101,9
+101,6
@@
public class AltosDroid extends FragmentActivity {
private Messenger mService = null;
final Messenger mMessenger = new Messenger(new IncomingHandler(this));
private Messenger mService = null;
final Messenger mMessenger = new Messenger(new IncomingHandler(this));
- // Preferences
- private AltosDroidPreferences prefs = null;
-
// TeleBT Config data
private AltosConfigData mConfigData = null;
// Local Bluetooth adapter
// TeleBT Config data
private AltosConfigData mConfigData = null;
// Local Bluetooth adapter
@@
-343,8
+340,7
@@
public class AltosDroid extends FragmentActivity {
}
// Initialise preferences
}
// Initialise preferences
- prefs = new AltosDroidPreferences(this);
- AltosPreferences.init(prefs);
+ AltosDroidPreferences.init(this);
// Set up the window layout
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
// Set up the window layout
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
@@
-480,9
+476,7
@@
public class AltosDroid extends FragmentActivity {
}
}
}
}
- private void connectDevice(Intent data) {
- // Get the device MAC address
- String address = data.getExtras().getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);
+ private void connectDevice(String address) {
// Get the BLuetoothDevice object
BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
// Attempt to connect to the device
// Get the BLuetoothDevice object
BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
// Attempt to connect to the device
@@
-493,6
+487,12
@@
public class AltosDroid extends FragmentActivity {
}
}
}
}
+ private void connectDevice(Intent data) {
+ // Get the device MAC address
+ String address = data.getExtras().getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);
+ connectDevice(address);
+ }
+
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();