[Android] Fix the widget title and artist for streams
Nicolas Pomepuy
git at videolan.org
Fri Jun 17 09:14:38 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Jun 17 07:39:51 2022 +0200| [eeb25f8dcc5ca94e964a817f3ad21deb6c5343f9] | committer: Nicolas Pomepuy
Fix the widget title and artist for streams
Fixes #2574
> https://code.videolan.org/videolan/vlc-android/commit/eeb25f8dcc5ca94e964a817f3ad21deb6c5343f9
---
.../src/org/videolan/vlc/widget/MiniPlayerAppWidgetProvider.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/widget/MiniPlayerAppWidgetProvider.kt b/application/vlc-android/src/org/videolan/vlc/widget/MiniPlayerAppWidgetProvider.kt
index c25dbfc41..29f9b58e1 100644
--- a/application/vlc-android/src/org/videolan/vlc/widget/MiniPlayerAppWidgetProvider.kt
+++ b/application/vlc-android/src/org/videolan/vlc/widget/MiniPlayerAppWidgetProvider.kt
@@ -261,7 +261,7 @@ class MiniPlayerAppWidgetProvider : AppWidgetProvider() {
if (!playing)
setupTexts(context, views, widgetType, context.getString(R.string.widget_default_text), "")
else
- setupTexts(context, views, widgetType, widgetCacheEntry.currentMedia?.title, widgetCacheEntry.currentMedia?.artist)
+ setupTexts(context, views, widgetType, service?.title ?: widgetCacheEntry.currentMedia?.title, service?.artist ?: widgetCacheEntry.currentMedia?.artist)
if (widgetCacheEntry.playing != playing || colorChanged) views.setImageViewBitmap(R.id.play_pause, context.getColoredBitmapFromColor(getPlayPauseImage(playing, widgetType), foregroundColor))
views.setContentDescription(R.id.play_pause, context.getString(if (!playing) R.string.resume_playback_short_title else R.string.pause))
More information about the Android
mailing list