Respect App Requested Orientation on Close-to-Square Displays

On close-to-square displays, activity requested orientation
may not be respected. For example, on a square display,
a portrait activity may have a landscape window because
of insets such as the status bar and nav bar.

Bug: b/168754677
Test: atest ActivityRecordTests
Change-Id: I40a071399e3bc159a20ade917da4c94cace0524e
4 files changed