Do not display paired devices in the discovery activity
This commit is contained in:
parent
abeb642972
commit
9881b6c281
|
@ -179,6 +179,10 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleDeviceFound(BluetoothDevice device, short rssi) {
|
private void handleDeviceFound(BluetoothDevice device, short rssi) {
|
||||||
|
if (device.getBondState() == BluetoothDevice.BOND_BONDED) {
|
||||||
|
return; // ignore already bonded devices
|
||||||
|
}
|
||||||
|
|
||||||
GBDeviceCandidate candidate = new GBDeviceCandidate(device, rssi);
|
GBDeviceCandidate candidate = new GBDeviceCandidate(device, rssi);
|
||||||
if (DeviceHelper.getInstance().isSupported(candidate)) {
|
if (DeviceHelper.getInstance().isSupported(candidate)) {
|
||||||
int index = deviceCandidates.indexOf(candidate);
|
int index = deviceCandidates.indexOf(candidate);
|
||||||
|
|
Loading…
Reference in New Issue