1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-12 16:34:04 +02:00

Do not display paired devices in the discovery activity

This commit is contained in:
cpfeiffer 2016-07-05 20:46:47 +02:00
parent abeb642972
commit 9881b6c281

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);