[Android] Stop current playback only when needed
Geoffrey Métais
git at videolan.org
Tue Apr 19 17:07:54 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr 19 17:00:35 2016 +0200| [0fa83c3967b4cd371239026f354bb15cb5b922b3] | committer: Geoffrey Métais
Stop current playback only when needed
> https://code.videolan.org/videolan/vlc-android/commit/0fa83c3967b4cd371239026f354bb15cb5b922b3
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 5 +++++
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 5b73ba0..b81a3bf 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1784,6 +1784,11 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
}
@MainThread
+ public boolean isPlayingPopup() {
+ return mPopupManager != null;
+ }
+
+ @MainThread
public void showPopup() {
if (mPopupManager == null)
mPopupManager = new PopupManager(this);
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 7a56874..196a70b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -722,7 +722,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mPlaybackStarted = true;
final IVLCVout vlcVout = mService.getVLCVout();
- if (vlcVout.areViewsAttached())
+ if (vlcVout.areViewsAttached() && mService.isPlayingPopup())
mService.stopPlayback();
if (mPresentation == null) {
vlcVout.setVideoView(mSurfaceView);
More information about the Android
mailing list