Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5cb1b0e authored by Myles Watson's avatar Myles Watson
Browse files

Bluetooth ScanFilter: Allow null in setDeviceAddress

Bug: 187076761
Test: manual scan filter test
Change-Id: I6456be4baab4b2a2b6d4607619ff92370b8b457d
parent 8e3fb4c4
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -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);
        }
        }