public ScanFilter.Builder setManufacturerData(int manufacturerId, byte[] manufacturerData,
                                                                           byte[] manufacturerDataMask) {
            if (manufacturerData != null && manufacturerId < 0) {
                throw new IllegalArgumentException("invalid manufacture id");
            }
            if (mManufacturerDataMask != null) {
                if (mManufacturerData == null) {
                    throw new IllegalArgumentException(
                            "manufacturerData is null while manufacturerDataMask is not null");
                }
                // Since the mManufacturerDataMask is a bit mask for mManufacturerData, the lengths
                // of the two byte array need to be the same.
                if (mManufacturerData.length != mManufacturerDataMask.length) {
                    throw new IllegalArgumentException(
                            "size mismatch for manufacturerData and manufacturerDataMask");
                }
            }
            mManufacturerId = manufacturerId;
            mManufacturerData = manufacturerData;
            mManufacturerDataMask = manufacturerDataMask;
            return this;
        }
Set filter on partial manufacture data. For any bit in the mask, set it the 1 if it needs
to match the one in manufacturer data, otherwise set it to 0.
<p>
The {@code manufacturerDataMask} must have the same length of {@code manufacturerData}.

@throws IllegalArgumentException If the {@code manufacturerId} is invalid, or
            {@code manufacturerData} is null while {@code manufacturerDataMask} is not,
            or {@code manufacturerData} and {@code manufacturerDataMask} have different
            length.
rxandroidble/src/main/java/com/polidea/rxandroidble2/scan/ScanFilter.java