Catch libvlc options IllegalStateException
Description
This MR adds an error message in the UI and prevents vlc from restarting with wrong options, if the user provided libvlc options that throw IllegalStateException
Motivation and Context
Fixes #1236 (closed)
How Has This Been Tested?
- Built vlc-android (had to manually build soxr, + touch soxr, because of a pkg config issue I couldn't solve)
- Went to Preferences - Custom Libvlc Options and tried wrong options, ( -toto or -newoption something), and I am getting the Snack with the error message. If I enter a valid option (--freetype-rel-fontsize=42), I can notice the change. Another error will display the snacker again, and preserve the latest known valid libvlc options. If you enter a wrong option twice, it won't display the message another time, the event is triggered only if the text in the label has changed.
Screenshots / GIFs (if appropriate):
Nothing/Unit
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Enhancement (non-breaking change which cleans up / improves existing functionality) -
Breaking change (fix or feature that would cause existing functionality to change)
Checklist
-
I have read the CONTRIBUTING section of the README document.
Resolves
Fixes: #1236 (closed) Mention: #1236 (closed)
Edited by Geoffrey Métais