[Android] Fix widget issue with control buttons

Ludovic Fauvet git at videolan.org
Tue Jun 26 11:46:17 CEST 2012


android | branch: master | Ludovic Fauvet <etix at videolan.org> | Tue Jun 26 11:39:03 2012 +0200| [851f4d99339fba3683a7765687f0e13888cdbe75] | committer: Ludovic Fauvet

Fix widget issue with control buttons

Reported-by: Sébastien Toque <xilasz at gmail.com>

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=851f4d99339fba3683a7765687f0e13888cdbe75
---

 vlc-android/src/org/videolan/vlc/AudioService.java     |    2 +-
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/AudioService.java b/vlc-android/src/org/videolan/vlc/AudioService.java
index b318a8e..e057500 100644
--- a/vlc-android/src/org/videolan/vlc/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/AudioService.java
@@ -145,7 +145,7 @@ public class AudioService extends Service {
                 } else if (!mLibVLC.isPlaying() && mCurrentMedia != null) {
                     play();
                 } else {
-                    Intent iVlc = new Intent(context, AudioPlayerActivity.class);
+                    Intent iVlc = new Intent(context, MainActivity.class);
                     iVlc.putExtra(START_FROM_NOTIFICATION, true);
                     iVlc.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                     context.startActivity(iVlc);
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index a4252ff..58af631 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -23,6 +23,7 @@ package org.videolan.vlc.gui;
 import java.io.IOException;
 import java.util.ArrayList;
 
+import org.videolan.vlc.AudioService;
 import org.videolan.vlc.AudioServiceController;
 import org.videolan.vlc.LibVLC;
 import org.videolan.vlc.MediaLibrary;
@@ -185,7 +186,7 @@ public class MainActivity extends SherlockFragmentActivity {
         /* Restore last view */
         if(!mMediaLibraryActive)
             showDirectoryView();
-        else if (mCurrentViewTab == AUDIO_TAB)
+        else if (getIntent().hasExtra(AudioService.START_FROM_NOTIFICATION) || mCurrentViewTab == AUDIO_TAB)
             showAudioTab();
         else
             showVideoTab();



More information about the Android mailing list