Show binaural ASHA hearing aids addresses
The other ear device address is not displyed in device detail page. Show
2 addresses if the connected hearing aids is a binaural hearing aids.
Bug: 288284097
Test: connect a binaural hearing aids and check the addresses are displayed
Change-Id: I218e32f8d7dc1cf10fab0de906f2b44862ac357f
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsMacAddressController.java b/src/com/android/settings/bluetooth/BluetoothDetailsMacAddressController.java
index d80512e..9943013 100644
--- a/src/com/android/settings/bluetooth/BluetoothDetailsMacAddressController.java
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsMacAddressController.java
@@ -59,6 +59,12 @@
title.append("\n").append(member.getIdentityAddress());
}
mFooterPreference.setTitle(title);
+ } else if (mCachedDevice.getSubDevice() != null) {
+ StringBuilder title = new StringBuilder(mContext.getString(
+ R.string.bluetooth_multuple_devices_mac_address,
+ mCachedDevice.getIdentityAddress()));
+ title.append("\n").append(mCachedDevice.getSubDevice().getIdentityAddress());
+ mFooterPreference.setTitle(title);
} else {
mFooterPreference.setTitle(mContext.getString(
R.string.bluetooth_device_mac_address, mCachedDevice.getIdentityAddress()));