Currently when there is one active LEA headset and users toggle on the audio sharing, a dialog will pop up to ask users to pair new headset and share audio with it. After user click pair new device button on the dialog:
1. Route users to pair new device page.
2. If users pair an LEA headset, finish the pair new device page and
auto add source to the headset with loading indicators on audio
sharing page.
3. If users pair a classic headset, wait for timeout, pop up dialog
saying the paired headset is not compatible for audio sharing and
finish the pair new device page.
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Bug: 331892035
Change-Id: Ifb9579db0ef57d3a379cb5d17c66a604d1396bb4
1. Show "Sharing audio stream..." once starting audio sharing
2. Show "Sharing with <devicename>..." once adding source to the device
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Bug: 362858894
Change-Id: I6c19d999baaa91d6a5365f24e88efe79c2b38072
Enable the toggle when:
1. In audio sharing
2. No connected LEA device. We will show dialog to guide users to
connect a compatible device.
3. Has active device, which means it is a healthy state after broadcast
-> unicast switch.
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Test: atest
Bug: 305620450
Change-Id: I2c8067f7882df6943beb3704f63a3e1113ce55d2
Broadcast <-> unicast costs some time, so we grey out the audio
sharing toggle until the device get active on unicast when users toggle
off the sharing.
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Test: atest
Bug: 359755881
Change-Id: I868a470430f6fb54c142f17552d70fa5fa8a2476
When intent extra EXTRA_START_LE_AUDIO_SHARING is true, audio sharing
page needs auto toggle on the main switch and start audio sharing.
And if there are one active sink and one connected sink, auto add source
to them without popping up dialog.
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Bug: 331892035
Change-Id: I0c677ea33c9e0e3eeb8495c8618bff685b13a8ed
CachedBluetoothDevice can change its member variable mDevice, so we can
not rely on the CachedBluetoothDevice#getDevice when we add source to
it. This change will return BluetoothDevice instead of
CachedBluetoothDevice when fetchConnectedDevicesByGroupId, so that we
won't add source to unintended BluetoothDevice via
CachedBluetoothDevice#getDevice.
Fix: 350877510
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I4ee41b8f1449e7176f0a05a7dd4e59034c161824
Allow audio sharing with no connected le audio headset when settings_need_connected_ble_device_for_broadcast is false
Bug: 343277847
Test: atest
Change-Id: I560338d53ddf290550faf8198cd7173bb734d150
Also use startPrivateBroadcast() to start the broadcast with
compatibility config stored in SettingsProvider.
Test: manual
Bug: 305620450
Bug: 292538935
Change-Id: Iff067833fb0668531aa32957b414585751f2bcee
Fetch the active device before starting the sharing. Because once the
sharing is started, all devices connected will switch to inactive.
Flagged with enable_le_audio_sharing
Bug: 305620450
Test: manual
Change-Id: Ie287d1094fe40dbcb42c121ea79409fc48e0eec7
New flow: Automatically add sharing source to connected active device eligible for
audio sharing. And then pop up the dialog for users to choose an additinal eligible device
to share audio.
Old flow: Pop up the dialog first and add sharing source after user
interact to the dialog.
Flagged with enable_le_audio_sharing
Bug: 305620450
Test: Manual
Change-Id: If0d1609b2677ca9ecae926c198f305fd1f4e34d3
The preference controllers attached to audio sharing page will extends
this base controller so that their visibility will be updated together
depending on the main switch state.
Flagged with enable_le_audio_sharing
Bug: 305620450
Test: Manual
Change-Id: I3d37c87a128098a1b1a38cb8621be9a4d4e8c15e
Switch and SwitchCompat are both CompoundButton.
Using CompoundButton in Java will helps migration in the future.
Bug: 306658427
Test: manual - check Settings pages
Change-Id: If2e08a9a9557ec66a3b31ef18cd2e15943098a59
Open the dialog when audio sharing main switch on.
Flagged with enable_le_audio_sharing
Bug: 305620450
Test: Manual
Change-Id: I5b7cf655782a1da8b4fbd42eca11b473bac339b0
This is private implement details, will be removed in future.
Should call MainSwitchBar's isChecked() and setChecked() to ensure
main switch bar's style is set correctly.
Bug: 306658427
Test: manual - on wifi tether
Test: manual - on developer options
Test: m RunSettingsRoboTests
Change-Id: I292ffbcf73da0721fc206e3dac7610a0aeb20047