Do not display paired devices in the discovery activity

master
cpfeiffer 2016-07-05 20:46:47 +02:00
parent abeb642972
commit 9881b6c281
1 changed files with 4 additions and 0 deletions

View File

@ -179,6 +179,10 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
}
private void handleDeviceFound(BluetoothDevice device, short rssi) {
if (device.getBondState() == BluetoothDevice.BOND_BONDED) {
return; // ignore already bonded devices
}
GBDeviceCandidate candidate = new GBDeviceCandidate(device, rssi);
if (DeviceHelper.getInstance().isSupported(candidate)) {
int index = deviceCandidates.indexOf(candidate);