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

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

Change-Id: I39d0a65cea4799f719d7d3111ad254d57da05825
This commit is contained in:
Treehugger Robot
2021-05-11 23:57:23 +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);
}