summaryrefslogtreecommitdiffstats
path: root/android/src/org/rockbox/widgets
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2011-03-09 18:46:55 +0000
committerAntoine Cellerier <dionoea@videolan.org>2011-03-09 18:46:55 +0000
commitfd7375c307a2bf99847b5de180efe98e829f2439 (patch)
treed35aaf32387efe6e78fbb3dd7a81ca9d1b2564f1 /android/src/org/rockbox/widgets
parent64cf0dd765dc11058a02024032784a9f2eb494b5 (diff)
downloadrockbox-fd7375c307a2bf99847b5de180efe98e829f2439.tar.gz
rockbox-fd7375c307a2bf99847b5de180efe98e829f2439.tar.bz2
rockbox-fd7375c307a2bf99847b5de180efe98e829f2439.zip
Ask for track information to be resent after creating a new widget.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29553 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android/src/org/rockbox/widgets')
-rw-r--r--android/src/org/rockbox/widgets/RockboxWidgetConfigure.java8
-rw-r--r--android/src/org/rockbox/widgets/RockboxWidgetProvider.java1
2 files changed, 8 insertions, 1 deletions
diff --git a/android/src/org/rockbox/widgets/RockboxWidgetConfigure.java b/android/src/org/rockbox/widgets/RockboxWidgetConfigure.java
index 700fc2fa1a..82cfc1553f 100644
--- a/android/src/org/rockbox/widgets/RockboxWidgetConfigure.java
+++ b/android/src/org/rockbox/widgets/RockboxWidgetConfigure.java
@@ -22,17 +22,18 @@
package org.rockbox.widgets;
import org.rockbox.R;
+import org.rockbox.RockboxService;
import android.app.Activity;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
-
public class RockboxWidgetConfigure extends Activity
{
int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;
@@ -84,6 +85,11 @@ public class RockboxWidgetConfigure extends Activity
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
RockboxWidgetProvider.getInstance().updateAppWidget(context, appWidgetManager, mAppWidgetId, null);
+ /* Ask for track information so that new widgets display properly
+ * if rockbox was already playing */
+ context.startService(new Intent("org.rockbox.ResendTrackUpdateInfo",
+ Uri.EMPTY, context, RockboxService.class));
+
Intent result = new Intent();
result.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
setResult(RESULT_OK, result);
diff --git a/android/src/org/rockbox/widgets/RockboxWidgetProvider.java b/android/src/org/rockbox/widgets/RockboxWidgetProvider.java
index 4a012c7124..beeb81c13b 100644
--- a/android/src/org/rockbox/widgets/RockboxWidgetProvider.java
+++ b/android/src/org/rockbox/widgets/RockboxWidgetProvider.java
@@ -45,6 +45,7 @@ public class RockboxWidgetProvider extends AppWidgetProvider
super();
mInstance = this;
}
+
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds)
{