[Android] use setKeepScreenOn on the surfaceview

Sébastien Toque git at videolan.org
Fri Jun 22 15:06:50 CEST 2012


android | branch: master | Sébastien Toque <xilasz at gmail.com> | Fri Jun 22 15:05:53 2012 +0200| [ddd3062c66a4470af2a26021bad4928fecad252d] | committer: Sébastien Toque

use setKeepScreenOn on the surfaceview

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java    |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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 e32cad2..7ceb249 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -210,7 +210,7 @@ public class VideoPlayerActivity extends Activity {
             time = mLibVLC.getTime() - 5000;
             mLibVLC.pause();
         }
-        mOverlay.setKeepScreenOn(false);
+        mSurface.setKeepScreenOn(false);
 
         // Save position
         SharedPreferences preferences = getSharedPreferences(PreferencesActivity.NAME, MODE_PRIVATE);
@@ -807,7 +807,7 @@ public class VideoPlayerActivity extends Activity {
      */
     private void play() {
         mLibVLC.play();
-        mOverlay.setKeepScreenOn(true);
+        mSurface.setKeepScreenOn(true);
     }
 
     /**
@@ -815,7 +815,7 @@ public class VideoPlayerActivity extends Activity {
      */
     private void pause() {
         mLibVLC.pause();
-        mOverlay.setKeepScreenOn(false);
+        mSurface.setKeepScreenOn(false);
     }
 
     /**
@@ -839,7 +839,7 @@ public class VideoPlayerActivity extends Activity {
 
         if (location != null && location.length() > 0) {
             mLibVLC.readMedia(location, false);
-            mOverlay.setKeepScreenOn(true);
+            mSurface.setKeepScreenOn(true);
 
             // Save media for next time, and restore position if it's the same one as before
             lastLocation = preferences.getString(PreferencesActivity.LAST_MEDIA, null);



More information about the Android mailing list