[Android] Video player: catch IllegalArgumentException
Geoffrey Métais
git at videolan.org
Tue Nov 26 10:17:19 CET 2019
vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 26 10:16:19 2019 +0100| [4656310d751f3cf120355db6cc410242b19f8944] | committer: Geoffrey Métais
Video player: catch IllegalArgumentException
setRequestedOrientation() can cause this exception on Android 10
> https://code.videolan.org/videolan/vlc-android/commit/4656310d751f3cf120355db6cc410242b19f8944
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt | 2 ++
1 file changed, 2 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 6c9ea9b68..ba08d61e9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -458,6 +458,8 @@ open class VideoPlayerActivity : AppCompatActivity(), IPlaybackSettingsControlle
requestedOrientation = getScreenOrientation(screenOrientation)
} catch (ignored: IllegalStateException) {
Log.w(TAG, "onCreate: failed to set orientation")
+ } catch (ignored: IllegalArgumentException) {
+ Log.w(TAG, "onCreate: failed to set orientation")
}
// Extra initialization when no secondary display is detected
More information about the Android
mailing list