VLC Android don't take audiofocus back while switching from another HW source by widget button
Description
Android device can has several audio sources, e.g. 1)MP3 engine controlled by VLC and 2)hardware FM radio. When VLC plays MP3 track and user switchs audio to FM-radio and then tries to switch back to VLC from VLC widget's PLAY button, audiofocus doesnt switch to VLC.
Expected behavior
Audiofocus switches back to VLC
Actual behavior
Variant 1: Audiofocus stays at FM-radio, VLC widget's PLAY button changes to PAUSE, time starts ticking but sound is still from FM. Reproduced on my car head unit based on Unisoc UIS7862 & Android 10 Variant 2: Audiofocus switches to VLC but plays both with audio from FM-radio and from VLC (two sound streams mixes). Reproduced on my XIAOMI MI9T, Android 10
Steps to reproduce
- Create VLC widget on home screen
- Open VLC, select audio track, click PLAY and listen it
- Press HOME button on Android device, audio track still sounds
- Open a kind of other application working with different HW audio source, e.g. FM-radio app
- Select radio station and listen it
- Press HOME button on Android device, FM-radio still sounds
- Press PLAY button on VLC widget on home screen, check the sound - you can hear the issue
Screenshot / video
Context
App version
Android 3.5.4 and earlier (tried just for check)
Android version
10 QKQ1.190825.002 on MI9T 10 QP1A.190711.020 on car headunit
Device model
Xiaomi MI9T and TEYES SPRO+
App mode
Smartphone