Merge "Bluetooth ScanFilter: Allow null in setDeviceAddress" am: 561b4c8aad am: 05c6b40a84

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702025

Change-Id: Iec33cf48502271ca0f70eecc4a3a5347ebb2c5d5
This commit is contained in:
Treehugger Robot
2021-05-12 00:18:43 +00:00
committed by Automerger Merge Worker

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