Show identity address in the bluetooth details page

Bug: 197044261
Test: build pass
Change-Id: Ic1ef1d575f35c4b37d6f9195ec10dd31ed5bdd5b
This commit is contained in:
Chienyuan
2022-01-18 16:46:46 +08:00
committed by Chienyuan Huang
parent 0ccb8750b9
commit 84a9b23ba8
7 changed files with 11 additions and 4 deletions

View File

@@ -46,21 +46,22 @@ public class BluetoothDetailsMacAddressController extends BluetoothDetailsContro
protected void init(PreferenceScreen screen) {
mFooterPreference = screen.findPreference(KEY_DEVICE_DETAILS_FOOTER);
mFooterPreference.setTitle(mContext.getString(
R.string.bluetooth_device_mac_address, mCachedDevice.getAddress()));
R.string.bluetooth_device_mac_address, mCachedDevice.getIdentityAddress()));
}
@Override
protected void refresh() {
if (mCachedDevice.getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) {
StringBuilder title = new StringBuilder(mContext.getString(
R.string.bluetooth_multuple_devices_mac_address, mCachedDevice.getAddress()));
R.string.bluetooth_multuple_devices_mac_address,
mCachedDevice.getIdentityAddress()));
for (CachedBluetoothDevice member: mCachedDevice.getMemberDevice()) {
title.append("\n").append(member.getAddress());
title.append("\n").append(member.getIdentityAddress());
}
mFooterPreference.setTitle(title);
} else {
mFooterPreference.setTitle(mContext.getString(
R.string.bluetooth_device_mac_address, mCachedDevice.getAddress()));
R.string.bluetooth_device_mac_address, mCachedDevice.getIdentityAddress()));
}
}