From 35e217f91f7797b1224f6736261f6ac26a816c1b Mon Sep 17 00:00:00 2001 From: Isha Bobra Date: Thu, 8 Feb 2018 16:09:39 -0800 Subject: [PATCH] Show only 1 entry for hearing aid devices without killing the activity. This CL tries to detect Bluetooth hearing aid devices and tries to combine the entry of the hearing aids with the same HiSyncIds and show only 1 entry for each pair in the connected devices list. This CL also shows 2 battery status in the device details page. This change shows the combined entry after a user returns to the settings activity after pressing the back button or somehow without killing it. It also combines the entries just after pairing. Test: RunSettingsRoboTests Bug: 74204427 Change-Id: I47fb0bdd96b1cc972d88a4aef85d0113985d63bb --- res/layout-sw320dp/settings_entity_header.xml | 11 +++++++++++ res/layout/settings_entity_header.xml | 11 +++++++++++ .../BluetoothDetailsHeaderController.java | 16 +++++++++++++++- .../BluetoothDeviceDetailsFragment.java | 2 +- .../bluetooth/BluetoothDeviceUpdater.java | 7 ++++++- .../settings/widget/EntityHeaderController.java | 15 +++++++++++++++ .../BluetoothDetailsHeaderControllerTest.java | 13 ++++++++++++- .../bluetooth/BluetoothDeviceUpdaterTest.java | 10 ++++++++++ .../widget/EntityHeaderControllerTest.java | 10 +++++++--- 9 files changed, 88 insertions(+), 7 deletions(-) diff --git a/res/layout-sw320dp/settings_entity_header.xml b/res/layout-sw320dp/settings_entity_header.xml index 481a9c4cf85..79e12a92720 100644 --- a/res/layout-sw320dp/settings_entity_header.xml +++ b/res/layout-sw320dp/settings_entity_header.xml @@ -81,6 +81,17 @@ android:textAppearance="@android:style/TextAppearance.Material.Body1" android:textColor="?android:attr/textColorSecondary" /> + + diff --git a/res/layout/settings_entity_header.xml b/res/layout/settings_entity_header.xml index 2660ef05ace..b534c5ee3a3 100644 --- a/res/layout/settings_entity_header.xml +++ b/res/layout/settings_entity_header.xml @@ -75,6 +75,17 @@ android:textAppearance="@android:style/TextAppearance.Material.Body1" android:textColor="?android:attr/textColorSecondary" /> + +