[web-bluetooth] Pull Request: Consider watchAdvertisements value

odejesush has just submitted a new pull request for https://github.com/WebBluetoothCG/web-bluetooth:

== Consider watchAdvertisements value ==
This change updates the algorithms for `watchAdvertisements()` and `unwatchAdvertisements()` to consider the value of `this.watchingAdvertisements` before discovery is started or stopped for the Bluetooth device.

For `watchAdvertisements()`, if `this.watchingAdvertisements` is true, then the UA should already be scanning for advertisements for the device, so the algorithm should resolve the promise and return.

For `unwatchAdvertisements()`, if `this.watchingAdvertisements` is false, then the UA should not be scanning for advertisements for the device, so the algorithm should return.

See https://github.com/WebBluetoothCG/web-bluetooth/pull/478

Received on Monday, 9 March 2020 17:28:07 UTC