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
This commit is contained in:
Angela Wang
2023-07-11 03:35:50 +00:00
parent 5c44a4b751
commit e4d7d5e352

View File

@@ -59,6 +59,12 @@ public class BluetoothDetailsMacAddressController extends BluetoothDetailsContro
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()));