[Android] Don't show audio player if activity is finishing

Geoffrey Métais git at videolan.org
Tue Feb 5 13:48:14 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Feb  5 13:08:32 2019 +0100| [2a5556815381e356d3a95dbd6ab93158e2376574] | committer: Geoffrey Métais

Don't show audio player if activity is finishing

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
index 333ce5536..0183e2be3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
@@ -118,7 +118,6 @@ public class AudioPlayerContainerActivity extends BaseActivity {
     }
 
     private void initAudioPlayer() {
-        if (isFinishing()) return;
         findViewById(R.id.audio_player_stub).setVisibility(View.VISIBLE);
         mAudioPlayer = (AudioPlayer) getSupportFragmentManager().findFragmentById(R.id.audio_player);
         mBottomSheetBehavior = (BottomSheetBehavior) BottomSheetBehavior.from(mAudioPlayerContainer);
@@ -241,6 +240,7 @@ public class AudioPlayerContainerActivity extends BaseActivity {
     }
 
     private void showAudioPlayerImpl() {
+        if (isFinishing()) return;
         if (!isAudioPlayerReady()) initAudioPlayer();
         if (mAudioPlayerContainer.getVisibility() != View.VISIBLE) {
             mAudioPlayerContainer.setVisibility(View.VISIBLE);



More information about the Android mailing list