aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-05-05 15:44:19 -0700
committerScott Jackson <daneren2005@gmail.com>2013-05-05 15:44:19 -0700
commitccbf4a2bb324b7f354ba39519e6a7bdad8d56024 (patch)
tree93fb1a4ec722c33ffbd37de080726417d2e659f7
parent9a556cde9e3c430245d32422f3e797b742ed1574 (diff)
downloaddsub-ccbf4a2bb324b7f354ba39519e6a7bdad8d56024.tar.gz
dsub-ccbf4a2bb324b7f354ba39519e6a7bdad8d56024.tar.bz2
dsub-ccbf4a2bb324b7f354ba39519e6a7bdad8d56024.zip
Make widget intent names a little more unique
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/provider/DSubWidgetProvider.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/provider/DSubWidgetProvider.java b/subsonic-android/src/github/daneren2005/dsub/provider/DSubWidgetProvider.java
index c6861f0a..ef0ab956 100644
--- a/subsonic-android/src/github/daneren2005/dsub/provider/DSubWidgetProvider.java
+++ b/subsonic-android/src/github/daneren2005/dsub/provider/DSubWidgetProvider.java
@@ -43,6 +43,7 @@ import github.daneren2005.dsub.activity.MainActivity;
import github.daneren2005.dsub.domain.MusicDirectory;
import github.daneren2005.dsub.service.DownloadService;
import github.daneren2005.dsub.service.DownloadServiceImpl;
+import github.daneren2005.dsub.util.Constants;
import github.daneren2005.dsub.util.FileUtil;
/**
@@ -217,19 +218,19 @@ public class DSubWidgetProvider extends AppWidgetProvider {
views.setOnClickPendingIntent(R.id.appwidget_top, pendingIntent);
// Emulate media button clicks.
- intent = new Intent("1");
+ intent = new Intent("DSub.PLAY_PAUSE");
intent.setComponent(new ComponentName(context, DownloadServiceImpl.class));
intent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE));
pendingIntent = PendingIntent.getService(context, 0, intent, 0);
views.setOnClickPendingIntent(R.id.control_play, pendingIntent);
- intent = new Intent("2"); // Use a unique action name to ensure a different PendingIntent to be created.
+ intent = new Intent("DSub.NEXT"); // Use a unique action name to ensure a different PendingIntent to be created.
intent.setComponent(new ComponentName(context, DownloadServiceImpl.class));
intent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_NEXT));
pendingIntent = PendingIntent.getService(context, 0, intent, 0);
views.setOnClickPendingIntent(R.id.control_next, pendingIntent);
- intent = new Intent("3"); // Use a unique action name to ensure a different PendingIntent to be created.
+ intent = new Intent("DSub.PREVIOUS"); // Use a unique action name to ensure a different PendingIntent to be created.
intent.setComponent(new ComponentName(context, DownloadServiceImpl.class));
intent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PREVIOUS));
pendingIntent = PendingIntent.getService(context, 0, intent, 0);