[Android] Update video title if needed

Geoffrey Métais git at videolan.org
Fri Oct 13 16:28:37 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Oct 12 15:55:17 2017 +0200| [b84fdbd3060c4ce0586f2dd42c92af2883afd8e4] | committer: Geoffrey Métais

Update video title if needed

> https://code.videolan.org/videolan/vlc-android/commit/b84fdbd3060c4ce0586f2dd42c92af2883afd8e4
---

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java        | 7 +++++--
 1 file changed, 5 insertions(+), 2 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 5ad75dfe9..7525877fe 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1788,13 +1788,16 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
         stopLoading();
         updateOverlayPausePlay();
         updateNavStatus();
-        if (!mService.getCurrentMediaWrapper().hasFlag(MediaWrapper.MEDIA_PAUSED))
+        final MediaWrapper mw = mService.getCurrentMediaWrapper();
+        if (!mw.hasFlag(MediaWrapper.MEDIA_PAUSED))
             mHandler.sendEmptyMessageDelayed(FADE_OUT, OVERLAY_TIMEOUT);
         else {
-            mService.getCurrentMediaWrapper().removeFlags(MediaWrapper.MEDIA_PAUSED);
+            mw.removeFlags(MediaWrapper.MEDIA_PAUSED);
             mWasPaused = false;
         }
         setESTracks();
+        if (mTitle != null && mTitle.length() == 0)
+            mTitle.setText(mw.getTitle());
     }
 
     private void endReached() {



More information about the Android mailing list