[Android] Logic optimization
Geoffrey Métais
git at videolan.org
Thu Nov 17 17:59:52 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Nov 16 18:12:40 2016 +0100| [c0772af71835d96f0706162e16234fff43a34540] | committer: Geoffrey Métais
Logic optimization
> https://code.videolan.org/videolan/vlc-android/commit/c0772af71835d96f0706162e16234fff43a34540
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 9a7126b..869d890 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1685,8 +1685,8 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
if (mw == null)
return;
- boolean isVideoPlaying = isVideoPlaying();
- if (!mVideoBackground && mw.getType() == MediaWrapper.TYPE_VIDEO && isVideoPlaying)
+ boolean isVideoPlaying = mw.getType() == MediaWrapper.TYPE_VIDEO && isVideoPlaying();
+ if (!mVideoBackground && isVideoPlaying)
mw.addFlags(MediaWrapper.MEDIA_VIDEO);
if (mVideoBackground)
@@ -1722,8 +1722,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
mMediaPlayer.setMedia(media);
media.release();
- if (mw .getType() != MediaWrapper.TYPE_VIDEO || mw.hasFlag(MediaWrapper.MEDIA_FORCE_AUDIO)
- || isVideoPlaying) {
+ if (mw .getType() != MediaWrapper.TYPE_VIDEO || isVideoPlaying || mw.hasFlag(MediaWrapper.MEDIA_FORCE_AUDIO)) {
mMediaPlayer.setEqualizer(VLCOptions.getEqualizer(this));
mMediaPlayer.setVideoTitleDisplay(MediaPlayer.Position.Disable, 0);
changeAudioFocus(true);
More information about the Android
mailing list