Merge "Rename CachedBluetoothDevice.getConnectableProfiles()" into main
This commit is contained in:
@@ -47,7 +47,7 @@ public class BluetoothDetailsHeaderController extends BluetoothDetailsController
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
boolean hasLeAudio = mCachedDevice.getConnectableProfiles()
|
||||
boolean hasLeAudio = mCachedDevice.getUiAccessibleProfiles()
|
||||
.stream()
|
||||
.anyMatch(profile -> profile.getProfileId() == BluetoothProfile.LE_AUDIO);
|
||||
return !BluetoothUtils.isAdvancedDetailsHeader(mCachedDevice.getDevice()) && !hasLeAudio;
|
||||
|
||||
@@ -314,7 +314,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
|
||||
return result;
|
||||
}
|
||||
for (CachedBluetoothDevice cachedItem : mAllOfCachedDevices) {
|
||||
List<LocalBluetoothProfile> tmpResult = cachedItem.getConnectableProfiles();
|
||||
List<LocalBluetoothProfile> tmpResult = cachedItem.getUiAccessibleProfiles();
|
||||
for (LocalBluetoothProfile profile : tmpResult) {
|
||||
if (mProfileDeviceMap.containsKey(profile.toString())) {
|
||||
mProfileDeviceMap.get(profile.toString()).add(cachedItem);
|
||||
|
||||
@@ -107,7 +107,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr
|
||||
if (mCachedDevice == null || mProfileManager == null) {
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
boolean hasLeAudio = mCachedDevice.getConnectableProfiles()
|
||||
boolean hasLeAudio = mCachedDevice.getUiAccessibleProfiles()
|
||||
.stream()
|
||||
.anyMatch(profile -> profile.getProfileId() == BluetoothProfile.LE_AUDIO);
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ public class AudioSharingDevicePreferenceController extends BasePreferenceContro
|
||||
}
|
||||
|
||||
private boolean isMediaDevice(CachedBluetoothDevice cachedDevice) {
|
||||
return cachedDevice.getConnectableProfiles().stream()
|
||||
return cachedDevice.getUiAccessibleProfiles().stream()
|
||||
.anyMatch(
|
||||
profile ->
|
||||
profile instanceof A2dpProfile
|
||||
|
||||
Reference in New Issue
Block a user