[Android] PiP: catch IllegalArgumentException
Geoffrey Métais
git at videolan.org
Tue Dec 24 12:11:05 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 24 08:58:55 2019 +0100| [ca418f49eb961397ba629c94f7f784b99af61c5b] | committer: Geoffrey Métais
PiP: catch IllegalArgumentException
Could happen if asptect ratio is extreme.
> https://code.videolan.org/videolan/vlc-android/commit/ca418f49eb961397ba629c94f7f784b99af61c5b
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index 3d844fd9c..5a039c801 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -1613,6 +1613,14 @@ open class VideoPlayerActivity : AppCompatActivity(), IPlaybackSettingsControlle
return AndroidUtil.isNougatOrLater && super.isInPictureInPictureMode()
}
+ override fun setPictureInPictureParams(params: PictureInPictureParams) {
+ try {
+ super.setPictureInPictureParams(params)
+ } catch (e: IllegalArgumentException) {
+ if (BuildConfig.DEBUG) throw e
+ }
+ }
+
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
super.onPictureInPictureModeChanged(isInPictureInPictureMode)
service?.mediaplayer?.updateVideoSurfaces()
More information about the Android
mailing list