[wm]: Fixed layout problem in PolicyControl immersive mode

If immersive mode is enabled by policy_control Setting, immersive mode is
forcibly applied to all windows. And systemui flags for immersive mode are
added to non fullscreen window by system. If non fullscreen window requests
BOTTOM gravity layout, it is covered by input method window.

Ensure content frame according to input method window.

Test: manual - manually enable immersive mode with next command.
adb shell settings put global policy_control "immersive.full=*"
And select input field in dialog window which has BOTTOM gravity.
Test: atest WmTests:DisplayPolicyLayoutTests
Bug: 129711077

Change-Id: I22617878d2025327b8323ef4dd03d043da2da552
(cherry picked from commit d90433afee1438c5a4a1a9be92343a197fa53cd7)
3 files changed