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:
Angela Wang
2024-08-02 07:05:13 +00:00
parent a8297a313b
commit 711d0b269c
6 changed files with 14 additions and 14 deletions

View File

@@ -114,7 +114,7 @@ public class BluetoothDetailsProfilesControllerTest extends BluetoothDetailsCont
setUpMockProfiles();
when(mCachedBluetoothDeviceManager.getCachedDevicesCopy())
.thenReturn(ImmutableList.of(mCachedDevice));
when(mCachedDevice.getConnectableProfiles())
when(mCachedDevice.getUiAccessibleProfiles())
.thenAnswer(invocation -> new ArrayList<>(mConnectableProfiles));
when(mCachedDevice.getProfiles())
.thenAnswer(invocation -> ImmutableList.of(mConnectableProfiles));