aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/app/src/com/android/bluetooth/gatt/ScanFilterQueue.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/android/app/src/com/android/bluetooth/gatt/ScanFilterQueue.java b/android/app/src/com/android/bluetooth/gatt/ScanFilterQueue.java
index 4572c89b75..8231519e39 100644
--- a/android/app/src/com/android/bluetooth/gatt/ScanFilterQueue.java
+++ b/android/app/src/com/android/bluetooth/gatt/ScanFilterQueue.java
@@ -181,13 +181,13 @@ import java.util.UUID;
addName(filter.getDeviceName());
}
if (filter.getDeviceAddress() != null) {
- byte addressType = (byte) filter.getAddressType();
- // If addressType == iADDRESS_TYPE_PUBLIC (0) then this is the original
- // setDeviceAddress(address) API path which provided DEVICE_TYPE_ALL (2) which might map
- // to the stack value for address type of BTM_BLE_STATIC (2)
- // Additionally, we shouldn't confuse device type with address type.
- addDeviceAddress(filter.getDeviceAddress(),
- ((addressType == 0) ? DEVICE_TYPE_ALL : addressType), filter.getIrk());
+ /*
+ * Pass the addres type here. This address type will be used for the resolving address,
+ * however, the host stack will force the type to 0x02 for the APCF filter in
+ * btm_ble_adv_filter.cc#BTM_LE_PF_addr_filter(...)
+ */
+ addDeviceAddress(filter.getDeviceAddress(), (byte) filter.getAddressType(),
+ filter.getIrk());
}
if (filter.getServiceUuid() != null) {
if (filter.getServiceUuidMask() == null) {