Skip to content

Pass bitmap to the media session. Provide URI in Android Auto mode.

Robert Stone requested to merge rhstone/vlc-android:fix-wear-os-cover-art into master

Description

This MR updates the media session to restore passing the bitmap directly instead of forcing consumers to invoke the ArtworkProvider. This allows WearOS to display cover art, as it appears to not support invoking the ContentProvider via the URI. In the case of Android Auto, we drop the bitmap and only specify the URI. If we specify both the Bitmap and URI, the URI is ignored and the "wrong cover art" problem re-appears.

This also partially resolves the issues with embedded artwork by directly using the loaded and parsed media. I added additional logic within the ArtworkProvider, which now loads embedded artwork as well. This does not resolve the issue with menu navigation as it relies on the medialibrary images.

Motivation and Context

This resolves issue #2159 (closed).

How Has This Been Tested?

Tested with the WearOS Emulator connected to a Pixel 3.

Please review the code even though it is currently in draft. I'm leaving it in draft while I continue to test the modifications.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING section of the README document.

Resolves

Fixes: #2159 (closed)

Edited by Robert Stone

Merge request reports