commit | 05c6b40a848d9aa0c19638ae193354e003c58726 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Tue May 11 23:57:23 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue May 11 23:57:23 2021 +0000 |
tree | 1996f0a37bd7dc2d9d6b37810cd9d126d06f17f1 | |
parent | 1888a8a8d112e3c37b5a67b2fb0c2c2a087a9efa [diff] | |
parent | 561b4c8aad3ca4b83c1a946a783b134bc04bfac8 [diff] |
Merge "Bluetooth ScanFilter: Allow null in setDeviceAddress" am: 561b4c8aad Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702025 Change-Id: I39d0a65cea4799f719d7d3111ad254d57da05825
diff --git a/core/java/android/bluetooth/le/ScanFilter.java b/core/java/android/bluetooth/le/ScanFilter.java index 3c20dca..a74c663 100644 --- a/core/java/android/bluetooth/le/ScanFilter.java +++ b/core/java/android/bluetooth/le/ScanFilter.java
@@ -587,6 +587,10 @@ * @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); }