[LE Audio] To remove the broadcast source item that created by receive
state
- When the user clicks another broadcast source and wants to join,
we will remove the previous item that created by getAllSource().
And trigger the search again.
Bug: 242267719
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothBroadcastSourcePreferenceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothFindBroadcastsFragmentTest
Change-Id: I416f0a39e31276876e63360664555f99dd7297c9
Merged-In: I416f0a39e31276876e63360664555f99dd7297c9
This commit is contained in:
@@ -170,6 +170,16 @@ class BluetoothBroadcastSourcePreference extends Preference {
|
||||
return mIsEncrypted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the broadcast source is connected at the beginging. We will get the
|
||||
* BluetoothLeBroadcastReceiveState from the broadcast source.
|
||||
* See {@link BluetoothFindBroadcastsFragment#addConnectedSourcePreference}
|
||||
* @return If true, the broadcast source is already connected by the broadcast sink.
|
||||
*/
|
||||
public boolean isCreatedByReceiveState() {
|
||||
return mBluetoothLeBroadcastReceiveState != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the BluetoothLeBroadcastReceiveState and reset the state when the user clicks the
|
||||
* "leave broadcast" button.
|
||||
|
||||
Reference in New Issue
Block a user