I am using the following code to set orientation locking per user preference:
private void doLock(boolean locked) { if (locked) { int o = getRes
Simple and functional>