[Audiosharing] Avoid dup volume control entries
Test: atest Bug: 402384034 Flag: com.android.settingslib.flags.enable_le_audio_sharing Change-Id: I1c975a39106d50746c692586bf682301dd299f40
This commit is contained in:
@@ -277,7 +277,10 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback,
|
||||
}
|
||||
}
|
||||
|
||||
private void removePreference(BluetoothDevice device) {
|
||||
/**
|
||||
* Remove the {@link Preference} that represents the {@code device}
|
||||
*/
|
||||
protected void removePreference(BluetoothDevice device) {
|
||||
if (mPreferenceMap.containsKey(device)) {
|
||||
if (mPreferenceMap.get(device) instanceof BluetoothDevicePreference preference) {
|
||||
BluetoothDevice prefDevice = preference.getBluetoothDevice().getDevice();
|
||||
@@ -362,7 +365,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback,
|
||||
return mLocalManager.getCachedDeviceManager().getCachedDevicesCopy().contains(cachedDevice);
|
||||
}
|
||||
|
||||
private boolean isDeviceOfMapInCachedDevicesList(BluetoothDevice inputBluetoothDevice) {
|
||||
protected boolean isDeviceOfMapInCachedDevicesList(BluetoothDevice inputBluetoothDevice) {
|
||||
Collection<CachedBluetoothDevice> cachedDevices =
|
||||
mLocalManager.getCachedDeviceManager().getCachedDevicesCopy();
|
||||
if (cachedDevices == null || cachedDevices.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user