From 22e3abf3661d7de42b3e6c738d8167718e3ca218 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 3 Jul 2020 15:27:31 +0200 Subject: DBTDevice (C++/Java) equality/identity requires its EUI48 address _and_ BDAddressType The BDAddressType is the magic 49th bit of the EUI48 address, as it specifies the semantics of its 2-high bits. --- java/direct_bt/tinyb/DBTDevice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java') diff --git a/java/direct_bt/tinyb/DBTDevice.java b/java/direct_bt/tinyb/DBTDevice.java index c021ade5..74547cef 100644 --- a/java/direct_bt/tinyb/DBTDevice.java +++ b/java/direct_bt/tinyb/DBTDevice.java @@ -261,7 +261,7 @@ public class DBTDevice extends DBTObject implements BluetoothDevice return false; } final DBTDevice other = (DBTDevice)obj; - return address.equals(other.address); + return address.equals(other.address) && addressType.equals(other.addressType); } @Override -- cgit v1.2.3