Check resolved override bounds for attaching IME to activity

Since the bounds restricted by fixed aspect ratio are set in resolved
override bounds, the requested override bounds can be empty. And the
compat display insets can be null if the size compat activity hasn't
meet a configuration change. The resolved bounds should be the exact
result to check whether the activity uses different bounds than its
parent, otherwise IME window may attach to a letterboxed activity that
leads to the unexpected offset of IME.

Fixes: 157454580
Test: SizeCompatTests#testLetterboxFullscreenBoundsAndNotImeAttachable
Change-Id: Ifab3bab307fc0e96400bbabe70a400a48cb06682
2 files changed