[Android] AudioPlayerActivity: always return to the MainActivity after stop is pressed
Ludovic Fauvet
git at videolan.org
Sat Sep 29 16:18:28 CEST 2012
vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Sat Sep 29 16:01:22 2012 +0200| [8d29b7b24d9383e0d20be8766ce3c354500e8044] | committer: Ludovic Fauvet
AudioPlayerActivity: always return to the MainActivity after stop is pressed
This ensures there's always the MainActivity somewhere in the back
stack (even when restarted from an external intent or notification).
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=8d29b7b24d9383e0d20be8766ce3c354500e8044
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
index c008e13..e093fd6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
@@ -249,6 +249,9 @@ public class AudioPlayerActivity extends Activity implements IAudioPlayer {
public void onStopClick(View view) {
mAudioController.stop();
+ Intent intent = new Intent(this, MainActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+ startActivity(intent);
finish();
}
More information about the Android
mailing list