On API Level 18+,
you could use userLandscape or userPortrait instead,
as those will honor the user’s system-level choice of whether to lock screen rotation or not,
defaulting to the behavior of sensorLandscape or sensorPortrait if the user has not locked screen rotation.