Remove unavailable preset info option

Bug: 347134589
Test: atest BluetoothDetailsHearingAidsPresetsControllerTest
Flag: EXEMPT bugfix
Change-Id: Iabdbe675a08fcd172617ef31dd0b8fbe8dccbb89
This commit is contained in:
Angela Wang
2024-06-19 08:10:09 +00:00
parent 9a8b50baea
commit 2b78c17e84
2 changed files with 26 additions and 5 deletions

View File

@@ -276,7 +276,8 @@ public class BluetoothDetailsHearingAidsPresetsController extends
return;
}
List<BluetoothHapPresetInfo> infoList = mHapClientProfile.getAllPresetInfo(
mCachedDevice.getDevice());
mCachedDevice.getDevice()).stream().filter(
BluetoothHapPresetInfo::isAvailable).toList();
CharSequence[] presetNames = new CharSequence[infoList.size()];
CharSequence[] presetIndexes = new CharSequence[infoList.size()];
for (int i = 0; i < infoList.size(); i++) {