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

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

Change-Id: I48df730d65443e2417acf24d563ef7d7ad780340
This commit is contained in:
Treehugger Robot
2021-05-12 00:37:15 +00:00
committed by Automerger Merge Worker

View File

@@ -586,6 +586,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);
}