Rename CachedBluetoothDevice.getConnectableProfiles()
The original method name implied that the returned profiles were guaranteed to be connectable. However, it actually filters profiles based on user can access the profile in the UI and initiate the connection. Change the method name to getUiAccessibleProfiles() aligns the name with the actual behavior. Flag: EXEMPT simple renaming Bug: 356530795 Test: m Change-Id: Ib7d29a4bf9c213ddcecc567864583165ab97a099
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user