summaryrefslogtreecommitdiff
path: root/src/com/android/settings/development/LocalTerminalPreferenceController.java
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2017-09-12 16:26:06 -0700
committerJack He <siyuanh@google.com>2017-09-20 11:35:19 -0700
commitac040e3b1fc3488155e5bb337908c491627900bc (patch)
tree31123be12fcd7889c1ae71d9f00f0bb40f45a3d5 /src/com/android/settings/development/LocalTerminalPreferenceController.java
parentb9da1117d0c3c825ac633ae1a17a8eefcb81f362 (diff)
Bluetooth: remove unnecessary state tracking in BluetoothSummaryUpdater
* LocalBluetoothAdapter is already a cache of BluetoothAdapter and its methods should be used directly to obtain states instead of caching them in BluetoothSummaryUpdater - Use LocalBluetoothAdapter.isEnabled() to check whether Bluetooth is enabled - Use LocalBluetoothAdapter.getBondedDevices() to get list of bonded devices * BluetoothDevice is a stable Bluetooth API and its methods should not incur large latency. We should use API methods as much as possible to avoid intermediate wrappers - Use BluetoothDevice.isConnected() to check if a device is connected * Add more logging messages in error conditions * Show status as "Not Connected" when there is a state mismatch (i.e. adapter says it is connected, but no bonded device is connected) * Updated unit tests to reflect the latest behavior Bug: 65591907 Test: make, unit test, pair with Bluetooth devices, check Settings UI Change-Id: I0fa54959c8bed8ac67a935f150785ba8197d0411
Diffstat (limited to 'src/com/android/settings/development/LocalTerminalPreferenceController.java')
0 files changed, 0 insertions, 0 deletions