[Android] VideoPlayer : don't stop playing when press Back and mOverlaySlider is open .

Alexandre Perraud git at videolan.org
Tue Oct 2 16:06:21 CEST 2012


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Oct  2 15:29:45 2012 +0200| [637e4c864a57fa55b3f26e6a217e3557ddfef363] | committer: Jean-Baptiste Kempf

VideoPlayer : don't stop playing when press Back and mOverlaySlider is open.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=637e4c864a57fa55b3f26e6a217e3557ddfef363
---

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java   |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 8ff3e06..6fc0e61 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -408,6 +408,15 @@ public class VideoPlayerActivity extends Activity {
         super.onResume();
     }
 
+    @Override
+    public void onBackPressed() {
+        if (mOverlaySlider.isOpened()){
+            mOverlaySlider.animateClose();
+            return;
+        }
+        super.onBackPressed();
+    }
+
     public static void start(Context context, String location) {
         start(context, location, null, false);
     }



More information about the Android mailing list