chameleon: Add is_enabled method to BluetoothController
Let BluetoothController query the state of bluetooth module from
chameleond proxy.
BUG=chromium:476860
TEST=not used yet
Change-Id: I7516ec6055b822f01082e077695fc3a5e75b1d09
Reviewed-on: https://chromium-review.googlesource.com/274336
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
diff --git a/client/cros/chameleon/audio_board.py b/client/cros/chameleon/audio_board.py
index 453e115..496febf 100644
--- a/client/cros/chameleon/audio_board.py
+++ b/client/cros/chameleon/audio_board.py
@@ -240,3 +240,12 @@
"""Disables the bluetooth module."""
self._chameleond_proxy.AudioBoardDisableBluetooth()
logging.info('Disables bluetooth module on audio board.')
+
+
+ def is_enabled(self):
+ """Checks if the bluetooth module is enabled.
+
+ @returns: True if bluetooth module is enabled. False otherwise.
+
+ """
+ return self._chameleond_proxy.AudioBoardIsBluetoothEnabled()