Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
Coincidentally I was just thinking along these lines this morning. While I'm pretty sure there's no way to read that setting directly, I think you could infer it from other information, but only once the user actually tries re-orienting the device. You'd have to watch the orientation requests, which in the "locked" case would not arrive, and the device rotation data which should at all times accurately report which way gravity really is. If they're not aligned (and it would involve a bit of non-trivial timing since they're separate data sources) then you'd know the rotation lock was on and could warn the user (if that's what you intended).