From c2b0a356acb5c9e7b0e7f3b8bda4626f4bed5ee4 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 29 Sep 2020 11:18:03 +0200 Subject: [PATCH] Fix buffering indicator sometimes sticking We currently have no method to actively query the buffering state. Remove indicator if we can no longer receive updates. --- .../java/de/danoeh/antennapod/activity/VideoplayerActivity.java | 1 + .../java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java index 8c66b6a4c..e2db81739 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -102,6 +102,7 @@ public class VideoplayerActivity extends MediaplayerActivity { if (!PictureInPictureUtil.isInPictureInPictureMode(this)) { videoControlsHider.stop(); } + progressIndicator.setVisibility(View.GONE); // Controller released; we will not receive buffering updates } @Override diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java index f64f21936..e32fdb095 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java @@ -386,6 +386,7 @@ public class AudioPlayerFragment extends Fragment implements super.onStop(); controller.release(); controller = null; + progressIndicator.setVisibility(View.GONE); // Controller released; we will not receive buffering updates EventBus.getDefault().unregister(this); if (disposable != null) { disposable.dispose();