Merge "Fix incorrect summary for LE audio hearing aids" into main

This commit is contained in:
Angela Wang
2024-06-12 08:11:29 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 6 deletions

View File

@@ -148,7 +148,7 @@ public class AccessibilityHearingAidPreferenceController extends BasePreferenceC
// Check if another side of LE audio hearing aid is connected as a pair
final Set<CachedBluetoothDevice> memberDevices = device.getMemberDevice();
if (memberDevices.stream().anyMatch(m -> m.isConnected())) {
if (memberDevices.stream().anyMatch(m -> m.getDevice().isConnected())) {
return mContext.getString(
R.string.accessibility_hearingaid_left_and_right_side_device_summary,
name);
@@ -156,7 +156,7 @@ public class AccessibilityHearingAidPreferenceController extends BasePreferenceC
// Check if another side of ASHA hearing aid is connected as a pair
final CachedBluetoothDevice subDevice = device.getSubDevice();
if (subDevice != null && subDevice.isConnected()) {
if (subDevice != null && subDevice.getDevice().isConnected()) {
return mContext.getString(
R.string.accessibility_hearingaid_left_and_right_side_device_summary, name);
}