user
fun BluetoothAdapter.isOffOrTurningOff(): Boolean { return when (state) { BluetoothAdapter.STATE_OFF, BluetoothAdapter.STATE_TURNING_OFF -> true else -> false } }