[Android] Fix UninitializedPropertyAccessException on video player
Nicolas Pomepuy
git at videolan.org
Tue Jun 7 08:39:32 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Jun 7 07:52:56 2022 +0200| [a906824bc486c187e4783e25f791bd17eafe1750] | committer: Nicolas Pomepuy
Fix UninitializedPropertyAccessException on video player
Fixes #2560
It was happening when trying to disable accessibility events on the
progress bar before the view were initialized
> https://code.videolan.org/videolan/vlc-android/commit/a906824bc486c187e4783e25f791bd17eafe1750
---
.../src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
index c4dc76261..ca7273069 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerOverlayDelegate.kt
@@ -819,6 +819,7 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
hudBinding.playlistNext.visibility = if (show) View.VISIBLE else View.INVISIBLE
}
hudBinding.orientationToggle.visibility = if (player.isTv || AndroidDevices.isChromeBook) View.INVISIBLE else if (show) View.VISIBLE else View.INVISIBLE
+ if (!show) hudBinding.playerOverlaySeekbar.disableAccessibilityEvents() else hudBinding.playerOverlaySeekbar.enableAccessibilityEvents()
}
if (::hudRightBinding.isInitialized) {
val secondary = player.displayManager.isSecondary
@@ -843,7 +844,7 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
hudRightBinding.audioDelayQuickAction.text = "${(player.service?.audioDelay ?: 0L) / 1000L} ms"
}
- if (!show) hudBinding.playerOverlaySeekbar.disableAccessibilityEvents() else hudBinding.playerOverlaySeekbar.enableAccessibilityEvents()
+
}
/**
More information about the Android
mailing list