Merge "Bluetooth ScanFilter: Allow null in setDeviceAddress"
This commit is contained in:
@@ -587,6 +587,10 @@ public final class ScanFilter implements Parcelable {
|
|||||||
* @throws IllegalArgumentException If the {@code deviceAddress} is invalid.
|
* @throws IllegalArgumentException If the {@code deviceAddress} is invalid.
|
||||||
*/
|
*/
|
||||||
public Builder setDeviceAddress(String deviceAddress) {
|
public Builder setDeviceAddress(String deviceAddress) {
|
||||||
|
if (deviceAddress == null) {
|
||||||
|
mDeviceAddress = deviceAddress;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
return setDeviceAddress(deviceAddress, BluetoothDevice.ADDRESS_TYPE_PUBLIC);
|
return setDeviceAddress(deviceAddress, BluetoothDevice.ADDRESS_TYPE_PUBLIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user