[Audiosharing] Fix race condition for profile ready and flow collect

Since we can not garantee the order of profile ready and flow collect,
there is some cases AudioSharingRepository#inAudioSharing is always
flowOf(false) and volumeMap is always flowOf(emptyMap()) if the profile
is not available when flow is collected.

Test: atest
Bug: 336716411
Flag: com.android.settingslib.flags.volume_dialog_audio_sharing_fix
Change-Id: Idfc4f68c381a875737b718dd39877d15bcfc69bd
3 files changed