[Android] Ensure scan progress is not mistakenly displayed

Geoffrey Métais git at videolan.org
Thu Jan 31 14:33:56 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 31 14:32:32 2019 +0100| [66964cbc06be24aa7b66783bdd13e67c22091f04] | committer: Geoffrey Métais

Ensure scan progress is not mistakenly displayed

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

 vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
index 93d52cef4..f014e0838 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
@@ -304,6 +304,8 @@ public class AudioPlayerContainerActivity extends BaseActivity {
     }
 
     private void showProgressBar() {
+        final ScanProgress progress = MediaParsingService.Companion.getProgress().getValue();
+        if (progress == null || !Medialibrary.getInstance().isWorking()) return;
         final View vsc = findViewById(R.id.scan_viewstub);
         if (vsc != null) {
             vsc.setVisibility(View.VISIBLE);



More information about the Android mailing list