Commit Graph

19 Commits

Author SHA1 Message Date
Yiyi Shen
52cbe21569 [Audiosharing] Add audio sharing loggings (P4)
Bug: 331515891
Test: atest
Change-Id: I05e1c138f9cc32c4e873852f93bac65d3d0dc3ca
2024-06-17 18:46:11 +08:00
Yiyi Shen
2c6b9bb364 [Audiosharing] Increase audio sharing test coverage
Bug: 345686602
Test: atest
Change-Id: Iec196fc884c3b7ddd580eb8dd13b445d59e3b1b7
2024-06-14 14:30:14 +08:00
Yiyi Shen
e5bd60a0cf [Audiosharing] Migrate feature from overlay to Settings
Bug: 340379827
Test: atest
Change-Id: I3a88ac1d2f575f3be1f26f617479bbfd25cf6a8e
2024-05-16 05:05:41 +00:00
Yiyi Shen
dd7626f55b [Audiosharing] Clean up audio sharing from Settings
Bug: 324023639
Test: atest
Change-Id: Ie73790442f39af60b125bbd48182a700bb0b290a
2024-02-26 17:24:53 +08:00
Yiyi Shen
10bddfd334 [Audiosharing] Avoid dialog flickering for same bt device group.
Before this change, the dialog will dismiss and show up again if the
second bud of the same group is connected.

In this change, StopDialog and JoinDialog will only update the message
and event listener when the dialog is triggered by another device with the same group id or the new bt device with different group id. (No dismiss and show); DisconnectDialog will only dismiss and show again when a new bt device with different group id is connected and update the event listener when another device with the same group id connected.

Also dismiss the dialog when the triggering device disconnect or join
the sharing.

Test: atest
Bug: 305620450
Change-Id: I798812101cefb24185d76d56f78eae27712dd7a6
2024-02-06 11:52:58 +08:00
Yiyi Shen
b3331f3ea4 [Audiosharing] Use LE audio profile as fallback to get group id.
For non-CSIP LE audio device, use LE audio profile to get group id.

Also, did some refinement in this change.
1. Add more log
2. Use context#getMainExecutor instead, since postOnMainThread is
   deprecated.

Test: manual
Bug: 305620450
Bug: 319723439
Change-Id: I8056b2e7b6ab37915a518ad2290a0a7fb7671c18
2024-01-22 16:42:33 +08:00
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
6303736762 [Audiosharing] Move time consuming work to background.
Bug: 305620450
Test: manual
Change-Id: I9192d8ebbcd12d0bf13d0145d8a2e47cb8da5edd
2023-12-14 07:12:19 +00:00
Yiyi Shen
c36fe14ca8 [Audiosharing] Dismiss all dialogs before show a new one.
Flagged with enable_le_audio_sharing

Bug: 305620450
Test: manual
Change-Id: I9c3ed31185814b184c9591103636f495046ecd3c
2023-12-05 17:05:23 +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
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
1e71a03e65 [Audiosharing] Sort sharing candidates in Utils.
The active device is placed before the inactive one.
The bonded device is placed before the unbonded one.
The device with earlier bond timestamp is placed before the later one.
Otherwise, the device is ordered by name.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: Ie1eea7361fbed1635313b92790cec034cf669bbf
2023-11-21 07:59:14 +00: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
475f87bedc [Audiosharing] Impl the join audio sharing dialog.
Show the dialog when the first or second eligible remote device connected during the
sharing session;
Or when the second eligible remote device connected and
no sharing session.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: If59025d60821b00c169e0d739f4b68c31ce4bbbd
2023-11-14 18:09:45 +08:00
Yiyi Shen
2a2a748db4 [Audiosharing] Impl the switch audio sharing dialog.
Show the dialog when a third eligible remote device connected during the
sharing session.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: Ib6627b68ef3d70305e9136e09a079bb53a459b85
2023-11-14 15:31:45 +08:00
Yiyi Shen
28ef49e0ac [Audiosharing] Impl the stop audio sharing dialog.
Show the dialog when an ineligible remote device connected during the
sharing session.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: I3b3cc2e5e20dab7c07f9979bc01f53d6127ea20b
2023-11-08 18:08:35 +08:00
Yiyi Shen
2f2afa22fd [Audiosharing] Add audio sharing section to Connected devices page.
The section will show up during a sharing session.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: Manual
Change-Id: I59cf81b35dcbf328b253d72d7fdc86af450251ee
2023-11-08 13:41:05 +08:00