[Android] Fix widget configure button not opening the right widget

Nicolas Pomepuy git at videolan.org
Wed May 18 09:57:56 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu May  5 14:33:59 2022 +0200| [8046afa62a487ab7554b70d0614955929b8a55ff] | committer: Duncan McNamara

Fix widget configure button not opening the right widget

> https://code.videolan.org/videolan/vlc-android/commit/8046afa62a487ab7554b70d0614955929b8a55ff
---

 .../src/org/videolan/vlc/widget/MiniPlayerAppWidgetProvider.kt          | 2 ++
 1 file changed, 2 insertions(+)

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 c71fea98f..833c6cb4c 100644
--- a/application/vlc-android/src/org/videolan/vlc/widget/MiniPlayerAppWidgetProvider.kt
+++ b/application/vlc-android/src/org/videolan/vlc/widget/MiniPlayerAppWidgetProvider.kt
@@ -185,6 +185,8 @@ class MiniPlayerAppWidgetProvider : AppWidgetProvider() {
             val iConfigure = Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE).apply {
                 component = ComponentName(context, MiniPlayerConfigureActivity::class.java)
                 putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId)
+                //we have to add a data to this intent to differentiate intents from different widget instances
+                data = Uri.parse("vlc://mini_widget/$appWidgetId")
             }
 
             val piBackward = context.getPendingIntent(iBackward)



More information about the Android mailing list