The check avoids writing the same value to `bluetooth.visible` and the corresponding value change event. And yes, we should remove `setDiscoverable()`.