diff options
| author | Keith Packard <keithp@keithp.com> | 2011-04-19 08:43:40 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-04-19 08:43:40 -0700 |
| commit | 17f38e045fcd8ca0224095c0b2b7b098df77a8d8 (patch) | |
| tree | 07c49d1151a54d3176f2356b55b6f9f129305b9c /altosui/AltosUSBDevice.java | |
| parent | f249e5926f5fd9f86c41e7f0a414193533d4d8b0 (diff) | |
altosui: Use persistent list of bluetooth devices for device dialogs
Store a list of known bluetooth devices as preferences. Always include
those in device dialogs with an option to go browse for more devices
in both the device dialog and the Configure AltosUI dialog.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosUSBDevice.java')
| -rw-r--r-- | altosui/AltosUSBDevice.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/altosui/AltosUSBDevice.java b/altosui/AltosUSBDevice.java index deed0056..dc746a64 100644 --- a/altosui/AltosUSBDevice.java +++ b/altosui/AltosUSBDevice.java @@ -77,13 +77,13 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { return false; } - static AltosUSBDevice[] list(int product) { + static java.util.List<AltosDevice> list(int product) { if (!Altos.load_library()) return null; SWIGTYPE_p_altos_list list = libaltos.altos_list_start(); - ArrayList<AltosUSBDevice> device_list = new ArrayList<AltosUSBDevice>(); + ArrayList<AltosDevice> device_list = new ArrayList<AltosDevice>(); if (list != null) { for (;;) { AltosUSBDevice device = new AltosUSBDevice(); @@ -95,9 +95,6 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { libaltos.altos_list_finish(list); } - AltosUSBDevice[] devices = new AltosUSBDevice[device_list.size()]; - for (int i = 0; i < device_list.size(); i++) - devices[i] = device_list.get(i); - return devices; + return device_list; } }
\ No newline at end of file |
