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
Based on the framework API redesign, we will start/stop the volume control callback registration when user enter/leave the volume control page.
We will temporarily keep a map of the device to volume map and use the
volume value to set the initial state of the volume progress bar if it is valid.
If the volume value is null or invalid, we will read the music stream
volume from the audio manager to set the initial state.
Test: manual
Bug: 305620450
Change-Id: Iee3fba39af388782ac3498cb1610b248ced22c3c
This reverts commit 19d1d3d15d.
Reason for revert: revert it because this is not the root cause.
bug: 316867690
Change-Id: I0f168dbb64044aa720202af7b1040afd4f028c9c
This reverts commit cf0501e4d7.
Reason for revert: b/317462033, it seems a flaky but revert it first.
Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
1. Unregister the volume control callbacks in onDestroy
2. Reuse SeekBarPreference#setProgress
3. Fetch volume from AudioManager if got invalid volume from VC service.
Flagged with enable_le_audio_sharing
Bug: 305620450
Test: manual
Change-Id: Id63d1dbff4c3cbdeb91c2537d951c39e1a932220