Commit Graph

19 Commits

Author SHA1 Message Date
Yiyi Shen
a4cf715181 [Audiosharing] Set/get compatibility config by toggle.
Also use startPrivateBroadcast() to start the broadcast with
compatibility config stored in SettingsProvider.

Test: manual
Bug: 305620450
Bug: 292538935
Change-Id: Iff067833fb0668531aa32957b414585751f2bcee
2024-01-22 14:09:48 +08:00
Yiyi Shen
9f60c22fad [Audiosharing] Skip active device switch
For framework investigation on the handover issue.

Test: manual
Bug: 305620450
Change-Id: I84f87feac4b72f54eaa1f59ff5524b887bfd00f1
2024-01-10 19:22:11 +08:00
Yiyi Shen
ca6b0f7506 [Audiosharing] Use new API to start private broadcast.
Test: Manual
Bug: 305620450
Change-Id: I7607acdbc647c7c06969fda588ba159a8fb47ed0
2023-12-14 09:12:18 +00:00
Yiyi Shen
87e6d6e32c [Audiosharing] Fix main sharing flow.
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
2023-12-04 18:37:32 +08:00
Yiyi Shen
bc3a1fa31f [Audiosharing] Add feature gates as utils.
Flagged with enable_le_audio_sharing

Bug: 305620450
Test: manual
Change-Id: I022174b5b40300b46b7b8dd78c7cddf541ed2aec
2023-11-29 17:55:28 +08:00
Yiyi Shen
bdc870a4c1 [Audiosharing] Show/hide audio sharing settings based on BT state.
Flagged with enable_le_audio_sharing

Bug: 305620450
Test: atest
Change-Id: I1af8ae268194cfca8e03cc49151b68a25717e89a
2023-11-28 19:17:40 +08:00
Yiyi Shen
ae728039ac [Audiosharing] Enable/disable the main switch base on BT state.
Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: I48bf0c6fb40ff629610e6e1a48e209fea44ebdde
2023-11-24 15:41:43 +08:00
Yiyi Shen
b82f290fce [Audiosharing] Set earlist connected device active in sharing.
Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: I8e0132f3d982fe2723581cd2aafd3cb9a9ed409c
2023-11-23 15:40:50 +08:00
Yiyi Shen
ddebe7293b [Audiosharing] Reimpl audio sharing main switch
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
2023-11-22 11:38:01 +08:00
Yiyi Shen
83798bfbc5 [Audiosharing] Add a util class for audio sharing.
Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: Iea5d4faa83eeef2d7104b9c31679e9226b75f4a6
2023-11-15 11:22:41 +00:00
Yiyi Shen
21ed1b0358 [Audiosharing] Impl a base controller for audio sharing page.
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
2023-11-14 20:00:28 +08:00
Chaohui Wang
08a1c9876e Revert^2 "Migrate to CompoundButton.OnCheckedChangeListener"
8979681a8d

Change-Id: I60edd3aabf49afbe4aa016af780baa68d928bddf
2023-11-07 14:17:15 +00:00
Sebastian Pickl
8979681a8d Revert "Migrate to CompoundButton.OnCheckedChangeListener"
Revert submission 25147565-onSwitchChanged-CompoundButton

Reason for revert: breaking builds 

Bug:309601476

Reverted changes: /q/submissionid:25147565-onSwitchChanged-CompoundButton

Change-Id: Ie746db87d9c642599593aa3d5e5baf6b7ba89c0e
2023-11-07 13:26:36 +00:00
Chaohui Wang
71d1f021af Migrate to CompoundButton.OnCheckedChangeListener
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
2023-11-07 20:22:27 +08:00
Yiyi Shen
87372de071 [Audiosharing] Impl audio sharing main switch.
Start/stop broadcast when >=1 eligible buds connected.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: Ic982571f49ab79c39d0503929df4bb8be64b720e
2023-11-07 15:41:34 +08:00
Yiyi Shen
cded970a4b [Audiosharing] Impl audio sharing main switch.
Start/stop broadcast when no eligible  buds connected.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: I04359c0954e336ceb1a89a7836199b5be0b5e0c5
2023-11-03 16:20:35 +08:00
Yiyi Shen
738962fb28 [Audiosharing] Add audio sharing dialog.
Open the dialog when audio sharing main switch on.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: I5b7cf655782a1da8b4fbd42eca11b473bac339b0
2023-10-31 17:04:52 +08:00
Chaohui Wang
12ea5afdf1 Not call MainSwitchBar.getSwitch()
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
2023-10-25 13:52:43 +08:00
Yiyi Shen
4410df7f42 [Audiosharing] Add audio sharing settings with the main switch.
Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: I9ca520014d3f6f7147bb9b8e7648797e79b46f53
2023-10-24 16:12:13 +08:00