[Android] Show progressBar if browser is set after start

Geoffrey Métais git at videolan.org
Thu Jun 16 12:36:31 CEST 2016


vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun 16 12:28:00 2016 +0200| [60becd94f9367d782bf22069532a22c67d702cd8] | committer: Geoffrey Métais

Show progressBar if browser is set after start

(cherry picked from commit 98f4d38375cc21e043e88d6399be522af102ab47)

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

 vlc-android/src/org/videolan/vlc/media/MediaLibrary.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/media/MediaLibrary.java
index 3f5a22b..1f97a0f 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/media/MediaLibrary.java
@@ -500,9 +500,11 @@ public class MediaLibrary {
     }
 
     public void setBrowser(IBrowser browser) {
-        if (browser != null)
+        if (browser != null) {
             mBrowser = new WeakReference<>(browser);
-        else
+            if (isWorking() && mBrowser.get() != null)
+                mBrowser.get().showProgressBar();
+        } else
             mBrowser.clear();
     }
 }



More information about the Android mailing list