[Android] Crash fix
Nicolas Pomepuy
git at videolan.org
Fri Nov 27 07:55:51 CET 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov 26 14:03:58 2020 +0100| [a141939cbcdee1fb1b33f59eb94cc344faadac9d] | committer: Nicolas Pomepuy
Crash fix
> https://code.videolan.org/videolan/vlc-android/commit/a141939cbcdee1fb1b33f59eb94cc344faadac9d
---
.../src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
index a09ab60e8..fdbad6b7d 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
@@ -109,8 +109,8 @@ open class AudioPlayerContainerActivity : BaseActivity() {
get() = isAudioPlayerReady && playerBehavior.state == STATE_EXPANDED
override fun getSnackAnchorView(): View? {
- return if (::audioPlayerContainer.isInitialized && audioPlayerContainer.visibility != View.GONE && playerBehavior.state == STATE_COLLAPSED)
- audioPlayerContainer else if (playerBehavior.state == STATE_EXPANDED) findViewById(android.R.id.content) else findViewById(R.id.coordinator) ?: findViewById(android.R.id.content)
+ return if (::audioPlayerContainer.isInitialized && audioPlayerContainer.visibility != View.GONE && ::playerBehavior.isInitialized && playerBehavior.state == STATE_COLLAPSED)
+ audioPlayerContainer else if (::playerBehavior.isInitialized && playerBehavior.state == STATE_EXPANDED) findViewById(android.R.id.content) else findViewById(R.id.coordinator) ?: findViewById(android.R.id.content)
}
override fun onCreate(savedInstanceState: Bundle?) {
More information about the Android
mailing list