Hide aspect ratio button when not visibly letterboxed

In some close to square displays, status bar and cutout have been
decoupled from the configuration. Only navigation bar/taskbar insets are
considered in resolving fixed orientation configurations.

With taskbar insets, the aspect ratio of the containingAppBounds in
these displays can be <= activity aspect ratio, even if the orientation
is not respected with insets e.g. portrait app in portrait display
(which is landscape with taskbar insets). Don't letterbox the activity
in this case if the resulting fixed orientation bounds still matches the
parent bounds.

Don't show the aspect ratio button if the letterboxed activity is only
minimally letterboxed (activity bounds are more or equal to stable
bounds).

Bug: 319088395
Test: atest SizeCompatTests
      atest UserAspectRatioSettingsWindowManagerTest
Change-Id: I972945ced8f346304899413487d432edc0e8ee83
4 files changed