bluetooth: reload list of BT devices

smart_log
Georg Lukas 2011-09-13 20:23:06 +02:00
rodzic 1c7af2246c
commit 72441be560
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -11,7 +11,10 @@
public BluetoothDevicePreference(Context context, AttributeSet attrs) {
super(context, attrs);
}
protected void onPrepareDialogBuilder(android.app.AlertDialog.Builder builder) {
// hook into the builder to refresh the list
BluetoothAdapter bta = BluetoothAdapter.getDefaultAdapter();
Set<BluetoothDevice> pairedDevices = bta.getBondedDevices();
CharSequence[] entries = new CharSequence[pairedDevices.size()];
@ -24,6 +27,8 @@
}
setEntries(entries);
setEntryValues(entryValues);
super.onPrepareDialogBuilder(builder);
}
public BluetoothDevicePreference(Context context) {