Merge "Bluetooth ScanFilter: Allow null in setDeviceAddress"

This commit is contained in:
Treehugger Robot
2021-05-11 23:38:35 +00:00
committed by Gerrit Code Review

View File

@@ -587,6 +587,10 @@ public final class ScanFilter implements Parcelable {
* @throws IllegalArgumentException If the {@code deviceAddress} is invalid.
*/
public Builder setDeviceAddress(String deviceAddress) {
if (deviceAddress == null) {
mDeviceAddress = deviceAddress;
return this;
}
return setDeviceAddress(deviceAddress, BluetoothDevice.ADDRESS_TYPE_PUBLIC);
}