This MR is a collection of bug fixes for various issues:
- When connected to Android Auto, the display subtitle often does not update to show extra metadata (e.g. Track / Total Tracks • Artist - Album). This is due to the code invoking publishState() rather than executeUpdate(true) (which also includes publishState, but updates the display subtitle as well)
- Fixed NullPointerException in HeaderMediaListActivity. Updated function to handle a null playlist value.
- Fixed ArrayIndexOutOfBoundsException due to for-loop range. I optimized calls to getAllTracks to O(n) from O(n^2).
- Android Auto crashes on 3000x3000px cover art. I added a limit to check for anything larger than 2000x2000px. Note: I do not want to re-encode all artwork to a smaller size before passing to Android Auto. The AA Glide library handles resizing and caching imagery; any added operations within VLC slow artwork loading.
- Android Auto has a new feature for a tintable attribution icon. I evaluated several options (see below) and landed on a simple vlc logo. If @Corbax has something better, go for it! See: Build Media Apps for Cars - Attribution Icon
How Has This Been Tested?
Tested on a Pixel 3 running Android 11
Other options considered:
Types of changes
I have read the CONTRIBUTING section of the README document.