[Android] Show progressBar if browser is set after start

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


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

Show progressBar if browser is set after start

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

 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