Refactor screen orientation lock into separate function

Minor refactor to make an upcoming CL easier to read.

Change-Id: I3984252128505f7c655cb87b1728168e26498513
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1597908
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661135}
2 files changed