[Android] Handle keepScreen
Geoffrey Métais
git at videolan.org
Fri Apr 1 18:08:28 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 1 17:54:58 2016 +0200| [ecc17648ea44e6d831d3baaa396e71b2310e2934] | committer: Geoffrey Métais
Handle keepScreen
> https://code.videolan.org/videolan/vlc-android/commit/ecc17648ea44e6d831d3baaa396e71b2310e2934
---
vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
index c34fdd1..e3a3d72 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -88,6 +88,7 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
mService.setVideoTrackEnabled(false);
mService.removeCallback(this);
final IVLCVout vlcVout = mService.getVLCVout();
+ mRootView.setKeepScreenOn(false);
windowManager.removeView(mRootView);
vlcVout.detachViews();
vlcVout.removeCallback(mVoutCallBack);
@@ -291,10 +292,12 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
mService.removePopup();
break;
case MediaPlayer.Event.Playing:
+ mRootView.setKeepScreenOn(true);
mPlayPauseButton.setImageResource(R.drawable.ic_popup_pause);
showNotification();
break;
case MediaPlayer.Event.Paused:
+ mRootView.setKeepScreenOn(false);
mPlayPauseButton.setImageResource(R.drawable.ic_popup_play);
showNotification();
break;
More information about the Android
mailing list