SF: Extract getPreferredDisplayMode

Instead of aborting, error out from setDesiredDisplayModeSpecs if the
display or mode cannot be found (which could happen if the display is
disconnected) or if the mode is disallowed.

Bug: 241285876
Test: Refresh rate switching still works
Change-Id: Ifd7fdce0da596474440eb5195ab3ef3340772a05
2 files changed