Move policy handling into ATM hierarchy [3/n]

Adds the core of "static" overrides in the form of a new
resolution step during configuration update.

The general concept of "static" overrides is that the overrides
specified at a particular hierarchy level represent intent rather
than the actual state (which is what full configuration is for).
This means that policy constraints must be applied without
modifying the override configuration.

During configuration update (the onConfigurationChange chain),
the hierarchy level, itself, will resolve the requested overrides
based on its policy and constraints and apply the *resolved*
overrides to the full configuration. This allows the hierarchy to
be intrinsically adaptive. An example of how this can be used is
letter-boxing. Instead of baking letter-boxed bounds into the
override config and trying to keep it up-to-date by computing and
setting bounds in every code-path that could effect the bounds, we
can set the requested override config to fills-parent (null bounds)
and the hierarchy update will keep the resolved bounds updated
accordingly.

This CL introduces the new stage in configuration resolution
resolveOverrideConfiguration(). This gets run in onConfigurationChange
to update a new member mResolvedOverrideConfiguration which is what
ultimately overrides the full and merged configuration. The resolved
overrides are also what get sent to window containers which will
hopefully allow us to more-easily pull more logic out of the wm
hierarchy. To make things clearer, overrideConfiguration has
been renamed to requestedOverrideConfiguration.

The purpose of this resolution step is 2-fold: One, it provides
an opportunity for a hierarchy level to modify its configuration
before propagating to children; and two it allows hierarchy levels
to apply "dynamic" policy without modifying the actual overrides.
This is important for coalescing policy computation into the
hierarchy instead of spread out among various entry-points.

Bug: 113900640
Test: go/wm-smoke. Also wm servicestests+wmtests
Change-Id: I59dc60ec748693ae00d248a5a3c9953744920791
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
index 3b8d71d..7c83ecc 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
@@ -227,7 +227,8 @@
      */
     @Test
     public void testDisplayOverrideConfigUpdate() {
-        final Configuration currentOverrideConfig = mDisplayContent.getOverrideConfiguration();
+        final Configuration currentOverrideConfig =
+                mDisplayContent.getRequestedOverrideConfiguration();
 
         // Create new, slightly changed override configuration and apply it to the display.
         final Configuration newOverrideConfig = new Configuration(currentOverrideConfig);
@@ -237,7 +238,7 @@
         mWm.setNewDisplayOverrideConfiguration(newOverrideConfig, mDisplayContent);
 
         // Check that override config is applied.
-        assertEquals(newOverrideConfig, mDisplayContent.getOverrideConfiguration());
+        assertEquals(newOverrideConfig, mDisplayContent.getRequestedOverrideConfiguration());
     }
 
     /**