Use correct windowingMode when computing override config

The StackWindowController was calculating task bounds with
the WM-side windowingMode instead of the AM-side.
In this case, we are resizing during a windowingMode change
(fullscreen -> freeform). Since the windowingMode isn't sent
to WM-side yet, the smallestScreenWidthDp was set using
the old windowingMode resulting in the wrong resources being
used.

This change makes windowingMode one of the parameters (like
bounds/density) used to adjust the configuration.

Bug: 71028905
Test: ActivityStackTests and WindowConfigurationTests still pass.
      Open playstore maximized, go to an app page, restore window.
      Layout should now be appropriate for the smaller window.
Change-Id: Idcb538a768cd983ab9eac0d61a6dbea3e9dc64a5
5 files changed