Do not display paired devices in the discovery activity

(cherry picked from commit 9881b6c281)
This commit is contained in:
cpfeiffer 2016-07-05 20:46:47 +02:00
parent cb7c792ae7
commit 6b9f31f57c

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