From df832551265f810cf4d417d051da5b43feebc166 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Sun, 10 Mar 2013 02:56:53 +0800 Subject: [PATCH] Add "Show queue" to Action list User can now select "Show queue" as an action when interacting (press, long press, swipe up, swipe down) with the Cover in the Playback Screen. --- res/values/untranslatable.xml | 2 ++ src/ch/blinkenlights/android/vanilla/Action.java | 4 ++++ src/ch/blinkenlights/android/vanilla/PlaybackService.java | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/res/values/untranslatable.xml b/res/values/untranslatable.xml index 54bf5b86..82c8aa04 100644 --- a/res/values/untranslatable.xml +++ b/res/values/untranslatable.xml @@ -52,6 +52,7 @@ THE SOFTWARE. EnqueueArtist EnqueueGenre ClearQueue + ShowQueue ToggleControls @@ -69,6 +70,7 @@ THE SOFTWARE. @string/enqueue_current_artist @string/enqueue_current_genre @string/clear_queue + @string/show_queue @string/toggle_controls diff --git a/src/ch/blinkenlights/android/vanilla/Action.java b/src/ch/blinkenlights/android/vanilla/Action.java index c39b39ec..0f94a953 100644 --- a/src/ch/blinkenlights/android/vanilla/Action.java +++ b/src/ch/blinkenlights/android/vanilla/Action.java @@ -80,6 +80,10 @@ enum Action { * Clear the queue of all remaining songs. */ ClearQueue, + /** + * Show the queue. + */ + ShowQueue, /** * Toggle the controls in the playback activity. */ diff --git a/src/ch/blinkenlights/android/vanilla/PlaybackService.java b/src/ch/blinkenlights/android/vanilla/PlaybackService.java index f03e10e3..9d888b9f 100644 --- a/src/ch/blinkenlights/android/vanilla/PlaybackService.java +++ b/src/ch/blinkenlights/android/vanilla/PlaybackService.java @@ -1912,6 +1912,11 @@ public final class PlaybackService extends Service clearQueue(); Toast.makeText(this, R.string.queue_cleared, Toast.LENGTH_SHORT).show(); break; + case ShowQueue: + Intent intentShowQueue = new Intent(this, ShowQueueActivity.class); + intentShowQueue.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); + startActivity(intentShowQueue); + break; case ToggleControls: // Handled in FullPlaybackActivity.performAction break;