Background
Each time the device is being rotated, Android will destroy the current activity and re-create it with the new configuration.
An easy way to avoid activity re-creation is by adding "configChanges" values to the manifest ("screenSize" and "orientation" as I recall).
The problem
If you use the "configChanges" attribute, the app won't respect the orientation lock feature that some (or all?) Android devices have, which prevent anything from being rotated when the screen is being rotated.
What I've tried
I tried playing with the "screenOrientation" attribute values, yet none of them achieved what I wanted.
The question
How can I prevent the activity from being re-created when the screen changes its orientation, while also respecting the user preference of orientation-lock?
Is it perhaps possible to get the value of this preference, so that I could let the activity lock its orientation when it's being set?