OSDN Git Service

Fix the Hearing Aids connected state in Settings App
authorStanley Tng <stng@google.com>
Sun, 13 May 2018 22:08:33 +0000 (15:08 -0700)
committerStanley Tng <stng@google.com>
Mon, 21 May 2018 17:24:32 +0000 (10:24 -0700)
commit6159842dec1f35a6f4e8b6cb1e5730bea43631e3
treed26e4b93738fd933282888aef54a84f955b784e6
parent97abc762ccbf2118ded90d6e796d3db1666f3e6b
Fix the Hearing Aids connected state in Settings App

When two Hearing Aids devices are bonded, we should only show one device
in the Settings App and at the correct location based on the connected
state of the HA devices. When at least one HA device is connected, then
the Settings App should show it as connected. Otherwise, the Settings
App should show it as disconnected when both devices are disconnected.

Bug: 79760469
Test: Run the robotests for Settings and SettingsLib
Change-Id: I33e19af054b686b3d71b00dcbd6ff16febde6099
packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java
packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManagerTest.java