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/core/java/com/android/server/wm/ActivityDisplay.java b/services/core/java/com/android/server/wm/ActivityDisplay.java
index 7bf2c94..da997ba 100644
--- a/services/core/java/com/android/server/wm/ActivityDisplay.java
+++ b/services/core/java/com/android/server/wm/ActivityDisplay.java
@@ -183,7 +183,7 @@
 
     @Override
     public void onInitializeOverrideConfiguration(Configuration config) {
-        getOverrideConfiguration().updateFrom(config);
+        getRequestedOverrideConfiguration().updateFrom(config);
     }
 
     void addChild(ActivityStack stack, int position) {
@@ -953,15 +953,16 @@
     }
 
     @Override
-    public void onOverrideConfigurationChanged(Configuration overrideConfiguration) {
-        final int currRotation = getOverrideConfiguration().windowConfiguration.getRotation();
+    public void onRequestedOverrideConfigurationChanged(Configuration overrideConfiguration) {
+        final int currRotation =
+                getRequestedOverrideConfiguration().windowConfiguration.getRotation();
         if (currRotation != ROTATION_UNDEFINED
                 && currRotation != overrideConfiguration.windowConfiguration.getRotation()
                 && getWindowContainerController() != null) {
             getWindowContainerController().applyRotation(currRotation,
                     overrideConfiguration.windowConfiguration.getRotation());
         }
-        super.onOverrideConfigurationChanged(overrideConfiguration);
+        super.onRequestedOverrideConfigurationChanged(overrideConfiguration);
     }
 
     @Override
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index daf4b8b..26a4cef 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -441,8 +441,13 @@
         mLastReportedConfiguration.dump(pw, prefix + " ");
 
         pw.print(prefix); pw.print("CurrentConfiguration="); pw.println(getConfiguration());
-        if (!getOverrideConfiguration().equals(EMPTY)) {
-            pw.println(prefix + "OverrideConfiguration=" + getOverrideConfiguration());
+        if (!getRequestedOverrideConfiguration().equals(EMPTY)) {
+            pw.println(prefix + "RequestedOverrideConfiguration="
+                    + getRequestedOverrideConfiguration());
+        }
+        if (!getResolvedOverrideConfiguration().equals(getRequestedOverrideConfiguration())) {
+            pw.println(prefix + "ResolvedOverrideConfiguration="
+                    + getResolvedOverrideConfiguration());
         }
         if (!matchParentBounds()) {
             pw.println(prefix + "bounds=" + getBounds());
@@ -2531,13 +2536,13 @@
         mTmpConfig.unset();
         computeBounds(mTmpBounds);
 
-        if (mTmpBounds.equals(getOverrideBounds())) {
+        if (mTmpBounds.equals(getRequestedOverrideBounds())) {
             return;
         }
 
         setBounds(mTmpBounds);
 
-        final Rect updatedBounds = getOverrideBounds();
+        final Rect updatedBounds = getRequestedOverrideBounds();
 
         // Bounds changed...update configuration to match.
         if (!matchParentBounds()) {
@@ -2545,7 +2550,7 @@
                     false /* overrideWidth */, false /* overrideHeight */);
         }
 
-        onOverrideConfigurationChanged(mTmpConfig);
+        onRequestedOverrideConfigurationChanged(mTmpConfig);
     }
 
     /** Returns true if the configuration is compatible with this activity. */
@@ -2602,11 +2607,11 @@
         if (containingAppWidth <= maxActivityWidth && containingAppHeight <= maxActivityHeight) {
             // The display matches or is less than the activity aspect ratio, so nothing else to do.
             // Return the existing bounds. If this method is running for the first time,
-            // {@link #getOverrideBounds()} will be empty (representing no override). If the method has run
-            // before, then effect of {@link #getOverrideBounds()} will already have been applied to the
-            // value returned from {@link getConfiguration}. Refer to
-            // {@link TaskRecord#computeOverrideConfiguration}.
-            outBounds.set(getOverrideBounds());
+            // {@link #getRequestedOverrideBounds()} will be empty (representing no override). If
+            // the method has run before, then effect of {@link #getRequestedOverrideBounds()} will
+            // already have been applied to the value returned from {@link getConfiguration}. Refer
+            // to {@link TaskRecord#computeOverrideConfiguration}.
+            outBounds.set(getRequestedOverrideBounds());
             return;
         }
 
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java
index 3ccede0..c41a173 100644
--- a/services/core/java/com/android/server/wm/ActivityStack.java
+++ b/services/core/java/com/android/server/wm/ActivityStack.java
@@ -264,8 +264,8 @@
             // If we created a docked stack we want to resize it so it resizes all other stacks
             // in the system.
             getStackDockedModeBounds(null, null, mTmpRect2, mTmpRect3);
-            mStackSupervisor.resizeDockedStackLocked(
-                    getOverrideBounds(), mTmpRect2, mTmpRect2, null, null, PRESERVE_WINDOWS);
+            mStackSupervisor.resizeDockedStackLocked(getRequestedOverrideBounds(), mTmpRect2,
+                    mTmpRect2, null, null, PRESERVE_WINDOWS);
         }
         mRootActivityContainer.updateUIDsPresentOnDisplay();
     }
@@ -562,7 +562,7 @@
         // Update bounds if applicable
         boolean hasNewOverrideBounds = false;
         // Use override windowing mode to prevent extra bounds changes if inheriting the mode.
-        if (getOverrideWindowingMode() == WINDOWING_MODE_PINNED) {
+        if (getRequestedOverrideWindowingMode() == WINDOWING_MODE_PINNED) {
             // Pinned calculation already includes rotation
             mTmpRect2.set(mTmpRect);
             hasNewOverrideBounds = getWindowContainerController().mContainer
@@ -589,8 +589,8 @@
                         || prevScreenH != getConfiguration().screenHeightDp) {
                     // Use override windowing mode to prevent extra bounds changes if inheriting
                     // the mode.
-                    if (getOverrideWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY
-                            || getOverrideWindowingMode()
+                    if (getRequestedOverrideWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY
+                            || getRequestedOverrideWindowingMode()
                             == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) {
                         mTmpRect2.set(mTmpRect);
                         getWindowContainerController().mContainer
@@ -602,11 +602,12 @@
         }
         if (getWindowingMode() != prevWindowingMode) {
             // Use override windowing mode to prevent extra bounds changes if inheriting the mode.
-            if (getOverrideWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY) {
+            if (getRequestedOverrideWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY) {
                 getStackDockedModeBounds(null, null, mTmpRect2, mTmpRect3);
                 // immediately resize so docked bounds are available in onSplitScreenModeActivated
                 resize(mTmpRect2, null /* tempTaskBounds */, null /* tempTaskInsetBounds */);
-            } else if (getOverrideWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) {
+            } else if (
+                    getRequestedOverrideWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) {
                 Rect dockedBounds = display.getSplitScreenPrimaryStack().getBounds();
                 final boolean isMinimizedDock = getDisplay().getWindowContainerController()
                         .mContainer.getDockedDividerController().isMinimizedDock();
@@ -672,7 +673,7 @@
     void setWindowingMode(int preferredWindowingMode, boolean animate, boolean showRecents,
             boolean enteringSplitScreenMode, boolean deferEnsuringVisibility, boolean creating) {
         final int currentMode = getWindowingMode();
-        final int currentOverrideMode = getOverrideWindowingMode();
+        final int currentOverrideMode = getRequestedOverrideWindowingMode();
         final ActivityDisplay display = getDisplay();
         final TaskRecord topTask = topTask();
         final ActivityStack splitScreenStack = display.getSplitScreenPrimaryStack();
@@ -725,7 +726,7 @@
             // You are already in the window mode, so we can skip most of the work below. However,
             // it's possible that we have inherited the current windowing mode from a parent. So,
             // fulfill this method's contract by setting the override mode directly.
-            getOverrideConfiguration().windowConfiguration.setWindowingMode(windowingMode);
+            getRequestedOverrideConfiguration().windowConfiguration.setWindowingMode(windowingMode);
             return;
         }
 
@@ -791,7 +792,7 @@
                 mWindowContainerController.getRawBounds(mTmpRect2);
             }
 
-            if (!Objects.equals(getOverrideBounds(), mTmpRect2)) {
+            if (!Objects.equals(getRequestedOverrideBounds(), mTmpRect2)) {
                 resize(mTmpRect2, null /* tempTaskBounds */, null /* tempTaskInsetBounds */);
             }
         } finally {
@@ -4934,8 +4935,8 @@
                     // For freeform stack we don't adjust the size of the tasks to match that
                     // of the stack, but we do try to make sure the tasks are still contained
                     // with the bounds of the stack.
-                    if (task.getOverrideBounds() != null) {
-                        mTmpRect2.set(task.getOverrideBounds());
+                    if (task.getRequestedOverrideBounds() != null) {
+                        mTmpRect2.set(task.getRequestedOverrideBounds());
                         fitWithinBounds(mTmpRect2, bounds);
                         task.updateOverrideConfiguration(mTmpRect2);
                     }
@@ -4946,9 +4947,9 @@
 
             if (task.hasDisplayedBounds()) {
                 mTmpBounds.put(task.taskId, task.getDisplayedBounds());
-                mTmpInsetBounds.put(task.taskId, task.getOverrideBounds());
+                mTmpInsetBounds.put(task.taskId, task.getRequestedOverrideBounds());
             } else {
-                mTmpBounds.put(task.taskId, task.getOverrideBounds());
+                mTmpBounds.put(task.taskId, task.getRequestedOverrideBounds());
                 mTmpInsetBounds.put(task.taskId, null);
             }
         }
@@ -5191,7 +5192,7 @@
                 pw.println("");
             }
             pw.println(prefix + "Task id #" + task.taskId);
-            pw.println(prefix + "mBounds=" + task.getOverrideBounds());
+            pw.println(prefix + "mBounds=" + task.getRequestedOverrideBounds());
             pw.println(prefix + "mMinWidth=" + task.mMinWidth);
             pw.println(prefix + "mMinHeight=" + task.mMinHeight);
             pw.println(prefix + "mLastNonFullscreenBounds=" + task.mLastNonFullscreenBounds);
@@ -5349,7 +5350,7 @@
         if (!mStackSupervisor.getLaunchParamsController()
                 .layoutTask(task, info.windowLayout, activity, source, options)
                 && !matchParentBounds() && task.isResizeable() && !isLockscreenShown) {
-            task.updateOverrideConfiguration(getOverrideBounds());
+            task.updateOverrideConfiguration(getRequestedOverrideBounds());
         }
         task.createWindowContainer(toTop, (info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0);
         return task;
@@ -5541,7 +5542,7 @@
         }
         proto.write(DISPLAY_ID, mDisplayId);
         if (!matchParentBounds()) {
-            final Rect bounds = getOverrideBounds();
+            final Rect bounds = getRequestedOverrideBounds();
             bounds.writeToProto(proto, BOUNDS);
         }
 
diff --git a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
index f3c5630..d92a9f2 100644
--- a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
@@ -2410,7 +2410,7 @@
             return;
         }
 
-        scheduleUpdatePictureInPictureModeIfNeeded(task, stack.getOverrideBounds());
+        scheduleUpdatePictureInPictureModeIfNeeded(task, stack.getRequestedOverrideBounds());
     }
 
     void scheduleUpdatePictureInPictureModeIfNeeded(TaskRecord task, Rect targetStackBounds) {
diff --git a/services/core/java/com/android/server/wm/ConfigurationContainer.java b/services/core/java/com/android/server/wm/ConfigurationContainer.java
index e779d1b..ded45c9 100644
--- a/services/core/java/com/android/server/wm/ConfigurationContainer.java
+++ b/services/core/java/com/android/server/wm/ConfigurationContainer.java
@@ -49,20 +49,28 @@
  */
 public abstract class ConfigurationContainer<E extends ConfigurationContainer> {
     /**
-     * {@link #Rect} returned from {@link #getOverrideBounds()} to prevent original value from being
-     * set directly.
+     * {@link #Rect} returned from {@link #getRequestedOverrideBounds()} to prevent original value
+     * from being set directly.
      */
     private Rect mReturnBounds = new Rect();
 
-    /** Contains override configuration settings applied to this configuration container. */
-    private Configuration mOverrideConfiguration = new Configuration();
+    /**
+     * Contains requested override configuration settings applied to this configuration container.
+     */
+    private Configuration mRequestedOverrideConfiguration = new Configuration();
 
-    /** True if mOverrideConfiguration is not empty */
+    /**
+     * Contains the requested override configuration with parent and policy constraints applied.
+     * This is the set of overrides that gets applied to the full and merged configurations.
+     */
+    private Configuration mResolvedOverrideConfiguration = new Configuration();
+
+    /** True if mRequestedOverrideConfiguration is not empty */
     private boolean mHasOverrideConfiguration;
 
     /**
      * Contains full configuration applied to this configuration container. Corresponds to full
-     * parent's config with applied {@link #mOverrideConfiguration}.
+     * parent's config with applied {@link #mResolvedOverrideConfiguration}.
      */
     private Configuration mFullConfiguration = new Configuration();
 
@@ -102,41 +110,62 @@
      * @see #mFullConfiguration
      */
     public void onConfigurationChanged(Configuration newParentConfig) {
+        mTmpConfig.setTo(mResolvedOverrideConfiguration);
+        resolveOverrideConfiguration(newParentConfig);
         mFullConfiguration.setTo(newParentConfig);
-        mFullConfiguration.updateFrom(mOverrideConfiguration);
+        mFullConfiguration.updateFrom(mResolvedOverrideConfiguration);
+        if (!mTmpConfig.equals(mResolvedOverrideConfiguration)) {
+            onMergedOverrideConfigurationChanged();
+            // This depends on the assumption that change-listeners don't do
+            // their own override resolution. This way, dependent hierarchies
+            // can stay properly synced-up with a primary hierarchy's constraints.
+            // Since the hierarchies will be merged, this whole thing will go away
+            // before the assumption will be broken.
+            // Inform listeners of the change.
+            for (int i = mChangeListeners.size() - 1; i >= 0; --i) {
+                mChangeListeners.get(i).onRequestedOverrideConfigurationChanged(
+                        mResolvedOverrideConfiguration);
+            }
+        }
         for (int i = getChildCount() - 1; i >= 0; --i) {
             final ConfigurationContainer child = getChildAt(i);
             child.onConfigurationChanged(mFullConfiguration);
         }
     }
 
-    /** Returns override configuration applied to this configuration container. */
-    public Configuration getOverrideConfiguration() {
-        return mOverrideConfiguration;
+    /**
+     * Resolves the current requested override configuration into
+     * {@link #mResolvedOverrideConfiguration}
+     *
+     * @param newParentConfig The new parent configuration to resolve overrides against.
+     */
+    void resolveOverrideConfiguration(Configuration newParentConfig) {
+        mResolvedOverrideConfiguration.setTo(mRequestedOverrideConfiguration);
+    }
+
+    /** Returns requested override configuration applied to this configuration container. */
+    public Configuration getRequestedOverrideConfiguration() {
+        return mRequestedOverrideConfiguration;
+    }
+
+    /** Returns the resolved override configuration. */
+    Configuration getResolvedOverrideConfiguration() {
+        return mResolvedOverrideConfiguration;
     }
 
     /**
      * Update override configuration and recalculate full config.
-     * @see #mOverrideConfiguration
+     * @see #mRequestedOverrideConfiguration
      * @see #mFullConfiguration
      */
-    public void onOverrideConfigurationChanged(Configuration overrideConfiguration) {
+    public void onRequestedOverrideConfigurationChanged(Configuration overrideConfiguration) {
         // Pre-compute this here, so we don't need to go through the entire Configuration when
         // writing to proto (which has significant cost if we write a lot of empty configurations).
         mHasOverrideConfiguration = !Configuration.EMPTY.equals(overrideConfiguration);
-        mOverrideConfiguration.setTo(overrideConfiguration);
+        mRequestedOverrideConfiguration.setTo(overrideConfiguration);
         // Update full configuration of this container and all its children.
         final ConfigurationContainer parent = getParent();
         onConfigurationChanged(parent != null ? parent.getConfiguration() : Configuration.EMPTY);
-        // Update merged override config of this container and all its children.
-        onMergedOverrideConfigurationChanged();
-
-        // Use the updated override configuration to notify listeners.
-        mTmpConfig.setTo(mOverrideConfiguration);
-        // Inform listeners of the change.
-        for (int i = mChangeListeners.size() - 1; i >=0; --i) {
-            mChangeListeners.get(i).onOverrideConfigurationChanged(mTmpConfig);
-        }
     }
 
     /**
@@ -157,9 +186,9 @@
         final ConfigurationContainer parent = getParent();
         if (parent != null) {
             mMergedOverrideConfiguration.setTo(parent.getMergedOverrideConfiguration());
-            mMergedOverrideConfiguration.updateFrom(mOverrideConfiguration);
+            mMergedOverrideConfiguration.updateFrom(mResolvedOverrideConfiguration);
         } else {
-            mMergedOverrideConfiguration.setTo(mOverrideConfiguration);
+            mMergedOverrideConfiguration.setTo(mResolvedOverrideConfiguration);
         }
         for (int i = getChildCount() - 1; i >= 0; --i) {
             final ConfigurationContainer child = getChildAt(i);
@@ -168,24 +197,26 @@
     }
 
     /**
-     * Indicates whether this container has not specified any bounds different from its parent. In
-     * this case, it will inherit the bounds of the first ancestor which specifies a bounds.
-     * @return {@code true} if no explicit bounds have been set at this container level.
+     * Indicates whether this container has not requested any bounds different from its parent. In
+     * this case, it will inherit the bounds of the first ancestor which specifies a bounds subject
+     * to policy constraints.
+     *
+     * @return {@code true} if no explicit bounds have been requested at this container level.
      *         {@code false} otherwise.
      */
     public boolean matchParentBounds() {
-        return getOverrideBounds().isEmpty();
+        return getRequestedOverrideBounds().isEmpty();
     }
 
     /**
-     * Returns whether the bounds specified is considered the same as the existing override bounds.
-     * This is either when the two bounds are equal or the override bounds is empty and the
-     * specified bounds is null.
+     * Returns whether the bounds specified are considered the same as the existing requested
+     * override bounds. This is either when the two bounds are equal or the requested override
+     * bounds are empty and the specified bounds is null.
      *
      * @return {@code true} if the bounds are equivalent, {@code false} otherwise
      */
-    public boolean equivalentOverrideBounds(Rect bounds) {
-        return equivalentBounds(getOverrideBounds(),  bounds);
+    public boolean equivalentRequestedOverrideBounds(Rect bounds) {
+        return equivalentBounds(getRequestedOverrideBounds(),  bounds);
     }
 
     /**
@@ -212,50 +243,52 @@
     }
 
     /**
-     * Returns the current bounds explicitly set on this container. The {@link Rect} handed back is
+     * Returns the bounds requested on this container. These may not be the actual bounds the
+     * container ends up with due to policy constraints. The {@link Rect} handed back is
      * shared for all calls to this method and should not be modified.
      */
-    public Rect getOverrideBounds() {
-        mReturnBounds.set(getOverrideConfiguration().windowConfiguration.getBounds());
+    public Rect getRequestedOverrideBounds() {
+        mReturnBounds.set(getRequestedOverrideConfiguration().windowConfiguration.getBounds());
 
         return mReturnBounds;
     }
 
     /**
-     * Returns {@code true} if the {@link WindowConfiguration} in the override
+     * Returns {@code true} if the {@link WindowConfiguration} in the requested override
      * {@link Configuration} specifies bounds.
      */
     public boolean hasOverrideBounds() {
-        return !getOverrideBounds().isEmpty();
+        return !getRequestedOverrideBounds().isEmpty();
     }
 
     /**
      * Sets the passed in {@link Rect} to the current bounds.
-     * @see {@link #getOverrideBounds()}.
+     * @see {@link #getRequestedOverrideBounds()}.
      */
-    public void getOverrideBounds(Rect outBounds) {
-        outBounds.set(getOverrideBounds());
+    public void getRequestedOverrideBounds(Rect outBounds) {
+        outBounds.set(getRequestedOverrideBounds());
     }
 
     /**
      * Sets the bounds at the current hierarchy level, overriding any bounds set on an ancestor.
-     * This value will be reported when {@link #getBounds()} and {@link #getOverrideBounds()}. If
+     * This value will be reported when {@link #getBounds()} and
+     * {@link #getRequestedOverrideBounds()}. If
      * an empty {@link Rect} or null is specified, this container will be considered to match its
      * parent bounds {@see #matchParentBounds} and will inherit bounds from its parent.
      * @param bounds The bounds defining the container size.
      * @return a bitmask representing the types of changes made to the bounds.
      */
     public int setBounds(Rect bounds) {
-        int boundsChange = diffOverrideBounds(bounds);
+        int boundsChange = diffRequestedOverrideBounds(bounds);
 
         if (boundsChange == BOUNDS_CHANGE_NONE) {
             return boundsChange;
         }
 
 
-        mTmpConfig.setTo(getOverrideConfiguration());
+        mTmpConfig.setTo(getRequestedOverrideConfiguration());
         mTmpConfig.windowConfiguration.setBounds(bounds);
-        onOverrideConfigurationChanged(mTmpConfig);
+        onRequestedOverrideConfigurationChanged(mTmpConfig);
 
         return boundsChange;
     }
@@ -265,14 +298,14 @@
         return setBounds(mTmpRect);
     }
 
-    int diffOverrideBounds(Rect bounds) {
-        if (equivalentOverrideBounds(bounds)) {
+    int diffRequestedOverrideBounds(Rect bounds) {
+        if (equivalentRequestedOverrideBounds(bounds)) {
             return BOUNDS_CHANGE_NONE;
         }
 
         int boundsChange = BOUNDS_CHANGE_NONE;
 
-        final Rect existingBounds = getOverrideBounds();
+        final Rect existingBounds = getRequestedOverrideBounds();
 
         if (bounds == null || existingBounds.left != bounds.left
                 || existingBounds.top != bounds.top) {
@@ -296,15 +329,16 @@
         return mFullConfiguration.windowConfiguration.getWindowingMode();
     }
 
-    public int getOverrideWindowingMode() {
-        return mOverrideConfiguration.windowConfiguration.getWindowingMode();
+    /** Returns the windowing mode override that is requested by this container. */
+    public int getRequestedOverrideWindowingMode() {
+        return mRequestedOverrideConfiguration.windowConfiguration.getWindowingMode();
     }
 
-    /** Sets the windowing mode for the configuration container. */
+    /** Sets the requested windowing mode override for the configuration container. */
     public void setWindowingMode(/*@WindowConfiguration.WindowingMode*/ int windowingMode) {
-        mTmpConfig.setTo(getOverrideConfiguration());
+        mTmpConfig.setTo(getRequestedOverrideConfiguration());
         mTmpConfig.windowConfiguration.setWindowingMode(windowingMode);
-        onOverrideConfigurationChanged(mTmpConfig);
+        onRequestedOverrideConfigurationChanged(mTmpConfig);
     }
 
     /** Sets the always on top flag for this configuration container.
@@ -314,16 +348,16 @@
      *  - {@Link ActivityDisplay#positionChildAtTop(ActivityStack)};
      * */
     public void setAlwaysOnTop(boolean alwaysOnTop) {
-        mTmpConfig.setTo(getOverrideConfiguration());
+        mTmpConfig.setTo(getRequestedOverrideConfiguration());
         mTmpConfig.windowConfiguration.setAlwaysOnTop(alwaysOnTop);
-        onOverrideConfigurationChanged(mTmpConfig);
+        onRequestedOverrideConfigurationChanged(mTmpConfig);
     }
 
     /** Sets the windowing mode for the configuration container. */
     void setDisplayWindowingMode(int windowingMode) {
-        mTmpConfig.setTo(getOverrideConfiguration());
+        mTmpConfig.setTo(getRequestedOverrideConfiguration());
         mTmpConfig.windowConfiguration.setDisplayWindowingMode(windowingMode);
-        onOverrideConfigurationChanged(mTmpConfig);
+        onRequestedOverrideConfigurationChanged(mTmpConfig);
     }
 
     /**
@@ -393,9 +427,9 @@
             throw new IllegalStateException("Can't change activity type once set: " + this
                     + " activityType=" + activityTypeToString(activityType));
         }
-        mTmpConfig.setTo(getOverrideConfiguration());
+        mTmpConfig.setTo(getRequestedOverrideConfiguration());
         mTmpConfig.windowConfiguration.setActivityType(activityType);
-        onOverrideConfigurationChanged(mTmpConfig);
+        onRequestedOverrideConfigurationChanged(mTmpConfig);
     }
 
     public boolean isActivityTypeHome() {
@@ -472,7 +506,7 @@
             return;
         }
         mChangeListeners.add(listener);
-        listener.onOverrideConfigurationChanged(mOverrideConfiguration);
+        listener.onRequestedOverrideConfigurationChanged(mResolvedOverrideConfiguration);
     }
 
     public void unregisterConfigurationChangeListener(ConfigurationContainerListener listener) {
@@ -508,7 +542,7 @@
     public void writeToProto(ProtoOutputStream proto, long fieldId, boolean trim) {
         final long token = proto.start(fieldId);
         if (!trim || mHasOverrideConfiguration) {
-            mOverrideConfiguration.writeToProto(proto, OVERRIDE_CONFIGURATION);
+            mRequestedOverrideConfiguration.writeToProto(proto, OVERRIDE_CONFIGURATION);
         }
         if (!trim) {
             mFullConfiguration.writeToProto(proto, FULL_CONFIGURATION);
@@ -526,7 +560,7 @@
         pw.println(getName()
                 + " type=" + activityTypeToString(getActivityType())
                 + " mode=" + windowingModeToString(getWindowingMode())
-                + " override-mode=" + windowingModeToString(getOverrideWindowingMode()));
+                + " override-mode=" + windowingModeToString(getRequestedOverrideWindowingMode()));
         for (int i = getChildCount() - 1; i >= 0; --i) {
             final E cc = getChildAt(i);
             pw.print(childPrefix + "#" + i + " ");
diff --git a/services/core/java/com/android/server/wm/ConfigurationContainerListener.java b/services/core/java/com/android/server/wm/ConfigurationContainerListener.java
index ff14d97..dc4939d 100644
--- a/services/core/java/com/android/server/wm/ConfigurationContainerListener.java
+++ b/services/core/java/com/android/server/wm/ConfigurationContainerListener.java
@@ -23,5 +23,6 @@
  */
 public interface ConfigurationContainerListener {
 
-    void onOverrideConfigurationChanged(Configuration overrideConfiguration);
+    /** {@see ConfigurationContainer#onRequestedOverrideConfigurationChanged} */
+    void onRequestedOverrideConfigurationChanged(Configuration overrideConfiguration);
 }
diff --git a/services/core/java/com/android/server/wm/DisplayWindowController.java b/services/core/java/com/android/server/wm/DisplayWindowController.java
index 55b3def..c7eadf9 100644
--- a/services/core/java/com/android/server/wm/DisplayWindowController.java
+++ b/services/core/java/com/android/server/wm/DisplayWindowController.java
@@ -87,7 +87,7 @@
     }
 
     @Override
-    public void onOverrideConfigurationChanged(Configuration overrideConfiguration) {
+    public void onRequestedOverrideConfigurationChanged(Configuration overrideConfiguration) {
         synchronized (mGlobalLock) {
             if (mContainer != null) {
                 mContainer.mWmService.setNewDisplayOverrideConfiguration(overrideConfiguration,
diff --git a/services/core/java/com/android/server/wm/RootActivityContainer.java b/services/core/java/com/android/server/wm/RootActivityContainer.java
index 1d86b46..f7877c0 100644
--- a/services/core/java/com/android/server/wm/RootActivityContainer.java
+++ b/services/core/java/com/android/server/wm/RootActivityContainer.java
@@ -864,7 +864,7 @@
             // Resize the pinned stack to match the current size of the task the activity we are
             // going to be moving is currently contained in. We do this to have the right starting
             // animation bounds for the pinned stack to the desired bounds the caller wants.
-            resizeStack(stack, task.getOverrideBounds(), null /* tempTaskBounds */,
+            resizeStack(stack, task.getRequestedOverrideBounds(), null /* tempTaskBounds */,
                     null /* tempTaskInsetBounds */, !PRESERVE_WINDOWS,
                     true /* allowResizeInDockedMode */, !DEFER_RESUME);
 
@@ -1297,7 +1297,7 @@
             throw new IllegalArgumentException("No display found with id: " + displayId);
         }
 
-        return activityDisplay.getOverrideConfiguration();
+        return activityDisplay.getRequestedOverrideConfiguration();
     }
 
     void setDisplayOverrideConfiguration(Configuration overrideConfiguration, int displayId) {
@@ -1306,7 +1306,7 @@
             throw new IllegalArgumentException("No display found with id: " + displayId);
         }
 
-        activityDisplay.onOverrideConfigurationChanged(overrideConfiguration);
+        activityDisplay.onRequestedOverrideConfigurationChanged(overrideConfiguration);
     }
 
     void prepareForShutdown() {
@@ -2161,7 +2161,7 @@
         for (int i = 0; i < displayCount; i++) {
             final ActivityDisplay activityDisplay = mActivityDisplays.get(i);
             pw.print(prefix); pw.print("  "); pw.print(activityDisplay.mDisplayId); pw.print(": ");
-            pw.println(activityDisplay.getOverrideConfiguration());
+            pw.println(activityDisplay.getRequestedOverrideConfiguration());
         }
     }
 
@@ -2190,7 +2190,7 @@
                         + ": type=" + activityTypeToString(stack.getActivityType())
                         + " mode=" + windowingModeToString(stack.getWindowingMode()));
                 pw.println("  isSleeping=" + stack.shouldSleepActivities());
-                pw.println("  mBounds=" + stack.getOverrideBounds());
+                pw.println("  mBounds=" + stack.getRequestedOverrideBounds());
 
                 printed |= stack.dumpActivitiesLocked(fd, pw, dumpAll, dumpClient, dumpPackage,
                         needSep);
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index b98d154..3a5c578 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -265,7 +265,7 @@
             DisplayContent displayContent) {
         if (controller != null && controller.mListener != null) {
             controller.mListener.onInitializeOverrideConfiguration(
-                    displayContent.getOverrideConfiguration());
+                    displayContent.getRequestedOverrideConfiguration());
         }
     }
 
@@ -356,13 +356,13 @@
     void setDisplayOverrideConfigurationIfNeeded(Configuration newConfiguration,
             @NonNull DisplayContent displayContent) {
 
-        final Configuration currentConfig = displayContent.getOverrideConfiguration();
+        final Configuration currentConfig = displayContent.getRequestedOverrideConfiguration();
         final boolean configChanged = currentConfig.diff(newConfiguration) != 0;
         if (!configChanged) {
             return;
         }
 
-        displayContent.onOverrideConfigurationChanged(newConfiguration);
+        displayContent.onRequestedOverrideConfigurationChanged(newConfiguration);
 
         if (displayContent.getDisplayId() == DEFAULT_DISPLAY) {
             // Override configuration of the default display duplicates global config. In this case
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index c70f075..67657d0 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -119,7 +119,7 @@
         mResizeMode = resizeMode;
         mSupportsPictureInPicture = supportsPictureInPicture;
         setController(controller);
-        setBounds(getOverrideBounds());
+        setBounds(getRequestedOverrideBounds());
         mTaskDescription = taskDescription;
 
         // Tasks have no set orientation value (including SCREEN_ORIENTATION_UNSPECIFIED).
@@ -369,7 +369,7 @@
      *                    the adjusted bounds's top.
      */
     void alignToAdjustedBounds(Rect adjustedBounds, Rect tempInsetBounds, boolean alignBottom) {
-        if (!isResizeable() || EMPTY.equals(getOverrideConfiguration())) {
+        if (!isResizeable() || EMPTY.equals(getRequestedOverrideConfiguration())) {
             return;
         }
 
diff --git a/services/core/java/com/android/server/wm/TaskRecord.java b/services/core/java/com/android/server/wm/TaskRecord.java
index 3cf0bd7..b6a6009 100644
--- a/services/core/java/com/android/server/wm/TaskRecord.java
+++ b/services/core/java/com/android/server/wm/TaskRecord.java
@@ -506,7 +506,7 @@
             // If this is a forced resize, let it go through even if the bounds is not changing,
             // as we might need a relayout due to surface size change (to/from fullscreen).
             final boolean forced = (resizeMode & RESIZE_MODE_FORCED) != 0;
-            if (equivalentOverrideBounds(bounds) && !forced) {
+            if (equivalentRequestedOverrideBounds(bounds) && !forced) {
                 // Nothing to do here...
                 return true;
             }
@@ -720,12 +720,12 @@
             // Make sure the task has the appropriate bounds/size for the stack it is in.
             final boolean toStackSplitScreenPrimary =
                     toStackWindowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
-            final Rect configBounds = getOverrideBounds();
+            final Rect configBounds = getRequestedOverrideBounds();
             if ((toStackWindowingMode == WINDOWING_MODE_FULLSCREEN
                     || toStackWindowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY)
-                    && !Objects.equals(configBounds, toStack.getOverrideBounds())) {
-                kept = resize(toStack.getOverrideBounds(), RESIZE_MODE_SYSTEM, !mightReplaceWindow,
-                        deferResume);
+                    && !Objects.equals(configBounds, toStack.getRequestedOverrideBounds())) {
+                kept = resize(toStack.getRequestedOverrideBounds(), RESIZE_MODE_SYSTEM,
+                        !mightReplaceWindow, deferResume);
             } else if (toStackWindowingMode == WINDOWING_MODE_FREEFORM) {
                 Rect bounds = getLaunchBounds();
                 if (bounds == null) {
@@ -739,8 +739,8 @@
                     // mode
                     mService.mStackSupervisor.moveRecentsStackToFront(reason);
                 }
-                kept = resize(toStack.getOverrideBounds(), RESIZE_MODE_SYSTEM, !mightReplaceWindow,
-                        deferResume);
+                kept = resize(toStack.getRequestedOverrideBounds(), RESIZE_MODE_SYSTEM,
+                        !mightReplaceWindow, deferResume);
             }
         } finally {
             windowManager.continueSurfaceLayout();
@@ -1546,7 +1546,7 @@
             return true;
         }
         final boolean landscape = bounds.width() > bounds.height();
-        final Rect configBounds = getOverrideBounds();
+        final Rect configBounds = getRequestedOverrideBounds();
         if (mResizeMode == RESIZE_MODE_FORCE_RESIZABLE_PRESERVE_ORIENTATION) {
             return configBounds.isEmpty()
                     || landscape == (configBounds.width() > configBounds.height());
@@ -1709,7 +1709,7 @@
             return;
         }
 
-        final Rect configBounds = getOverrideBounds();
+        final Rect configBounds = getRequestedOverrideBounds();
         if (adjustWidth) {
             if (!configBounds.isEmpty() && bounds.right == configBounds.right) {
                 bounds.left = bounds.right - minWidth;
@@ -1739,7 +1739,7 @@
         // (bounds == null), then leave the override config unset
         final Configuration newOverrideConfig = new Configuration();
         if (bounds != null) {
-            newOverrideConfig.setTo(getOverrideConfiguration());
+            newOverrideConfig.setTo(getRequestedOverrideConfiguration());
             if (insetBounds != null && !insetBounds.isEmpty()) {
                 mTmpRect.set(insetBounds);
                 setDisplayedBounds(bounds);
@@ -1781,13 +1781,13 @@
      * @return True if the override configuration was updated.
      */
     boolean updateOverrideConfiguration(Rect bounds, @Nullable Rect insetBounds) {
-        if (equivalentOverrideBounds(bounds)) {
+        if (equivalentRequestedOverrideBounds(bounds)) {
             return false;
         }
-        final Rect currentBounds = getOverrideBounds();
+        final Rect currentBounds = getRequestedOverrideBounds();
 
-        mTmpConfig.setTo(getOverrideConfiguration());
-        final Configuration newConfig = getOverrideConfiguration();
+        mTmpConfig.setTo(getRequestedOverrideConfiguration());
+        final Configuration newConfig = getRequestedOverrideConfiguration();
 
         final boolean matchParentBounds = bounds == null || bounds.isEmpty();
         final boolean persistBounds = getWindowConfiguration().persistTaskBounds();
@@ -1810,12 +1810,12 @@
             setBounds(mTmpRect);
 
             if (mStack == null || persistBounds) {
-                setLastNonFullscreenBounds(getOverrideBounds());
+                setLastNonFullscreenBounds(getRequestedOverrideBounds());
             }
             computeOverrideConfiguration(newConfig, mTmpRect,
                     mTmpRect.right != bounds.right, mTmpRect.bottom != bounds.bottom);
         }
-        onOverrideConfigurationChanged(newConfig);
+        onRequestedOverrideConfigurationChanged(newConfig);
         return !mTmpConfig.equals(newConfig);
     }
 
@@ -1949,7 +1949,7 @@
         if (bounds != null && !bounds.isEmpty()) {
             // TODO: Review if we actually want to do this - we are setting the launch bounds
             // directly here.
-            bounds.set(getOverrideBounds());
+            bounds.set(getRequestedOverrideBounds());
         }
         return bounds;
     }
@@ -1975,7 +1975,7 @@
                 mService.mStackSupervisor.getLaunchParamsController().layoutTask(this, null);
             }
         } else {
-            updateOverrideConfiguration(inStack.getOverrideBounds());
+            updateOverrideConfiguration(inStack.getRequestedOverrideBounds());
         }
     }
 
@@ -1989,9 +1989,9 @@
         if (!isActivityTypeStandardOrUndefined()
                 || windowingMode == WINDOWING_MODE_FULLSCREEN
                 || (windowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY && !isResizeable())) {
-            return isResizeable() ? mStack.getOverrideBounds() : null;
+            return isResizeable() ? mStack.getRequestedOverrideBounds() : null;
         } else if (!getWindowConfiguration().persistTaskBounds()) {
-            return mStack.getOverrideBounds();
+            return mStack.getRequestedOverrideBounds();
         }
         return mLastNonFullscreenBounds;
     }
@@ -2210,7 +2210,7 @@
         proto.write(FULLSCREEN, matchParentBounds());
 
         if (!matchParentBounds()) {
-            final Rect bounds = getOverrideBounds();
+            final Rect bounds = getRequestedOverrideBounds();
             bounds.writeToProto(proto, BOUNDS);
         }
         proto.write(MIN_WIDTH, mMinWidth);
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index b16e184c..11d9ebb 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -282,7 +282,7 @@
 
     @Override
     public int setBounds(Rect bounds) {
-        return setBounds(getOverrideBounds(), bounds);
+        return setBounds(getRequestedOverrideBounds(), bounds);
     }
 
     private int setBounds(Rect existing, Rect bounds) {
@@ -304,8 +304,8 @@
 
     /** Bounds of the stack without adjusting for other factors in the system like visibility
      * of docked stack.
-     * Most callers should be using {@link ConfigurationContainer#getOverrideBounds} as it take into
-     * consideration other system factors. */
+     * Most callers should be using {@link ConfigurationContainer#getRequestedOverrideBounds} a
+     * it takes into consideration other system factors. */
     void getRawBounds(Rect out) {
         out.set(getRawBounds());
     }
@@ -448,7 +448,8 @@
      * @param inOutBounds the bounds to update (both input and output).
      */
     void calculateDockedBoundsForConfigChange(Configuration parentConfig, Rect inOutBounds) {
-        final boolean primary = getOverrideWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
+        final boolean primary =
+                getRequestedOverrideWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
         repositionSplitScreenStackAfterRotation(parentConfig, primary, inOutBounds);
         final DisplayCutout cutout = mDisplayContent.getDisplayInfo().displayCutout;
         snapDockedStackAfterRotation(parentConfig, cutout, inOutBounds);
diff --git a/services/core/java/com/android/server/wm/TaskWindowContainerController.java b/services/core/java/com/android/server/wm/TaskWindowContainerController.java
index ec64d2e..b87b65e 100644
--- a/services/core/java/com/android/server/wm/TaskWindowContainerController.java
+++ b/services/core/java/com/android/server/wm/TaskWindowContainerController.java
@@ -157,7 +157,8 @@
                 throw new IllegalArgumentException("resizeTask: taskId " + mTaskId + " not found.");
             }
 
-            if (mContainer.setBounds(mContainer.getOverrideBounds(), forced) != BOUNDS_CHANGE_NONE
+            if (mContainer.setBounds(
+                    mContainer.getRequestedOverrideBounds(), forced) != BOUNDS_CHANGE_NONE
                     && relayout) {
                 mContainer.getDisplayContent().layoutAndAssignWindowLayersIfNeeded();
             }
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index c30cc17..651089d 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -469,15 +469,16 @@
 
     /**
      * Update override configuration and recalculate full config.
-     * @see #mOverrideConfiguration
+     * @see #mRequestedOverrideConfiguration
      * @see #mFullConfiguration
      */
     @Override
-    public void onOverrideConfigurationChanged(Configuration overrideConfiguration) {
+    public void onRequestedOverrideConfigurationChanged(Configuration overrideConfiguration) {
         // We must diff before the configuration is applied so that we can capture the change
         // against the existing bounds.
-        final int diff = diffOverrideBounds(overrideConfiguration.windowConfiguration.getBounds());
-        super.onOverrideConfigurationChanged(overrideConfiguration);
+        final int diff = diffRequestedOverrideBounds(
+                overrideConfiguration.windowConfiguration.getBounds());
+        super.onRequestedOverrideConfigurationChanged(overrideConfiguration);
         if (mParent != null) {
             mParent.onDescendantOverrideConfigurationChanged();
         }
diff --git a/services/core/java/com/android/server/wm/WindowContainerController.java b/services/core/java/com/android/server/wm/WindowContainerController.java
index 7cb89c5..17bc0e2 100644
--- a/services/core/java/com/android/server/wm/WindowContainerController.java
+++ b/services/core/java/com/android/server/wm/WindowContainerController.java
@@ -72,12 +72,12 @@
     }
 
     @Override
-    public void onOverrideConfigurationChanged(Configuration overrideConfiguration) {
+    public void onRequestedOverrideConfigurationChanged(Configuration overrideConfiguration) {
         synchronized (mGlobalLock) {
             if (mContainer == null) {
                 return;
             }
-            mContainer.onOverrideConfigurationChanged(overrideConfiguration);
+            mContainer.onRequestedOverrideConfigurationChanged(overrideConfiguration);
         }
     }
 }
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java
index 2dec4dd..f7f7528 100644
--- a/services/core/java/com/android/server/wm/WindowProcessController.java
+++ b/services/core/java/com/android/server/wm/WindowProcessController.java
@@ -770,8 +770,8 @@
     }
 
     @Override
-    public void onOverrideConfigurationChanged(Configuration newOverrideConfig) {
-        super.onOverrideConfigurationChanged(newOverrideConfig);
+    public void onRequestedOverrideConfigurationChanged(Configuration newOverrideConfig) {
+        super.onRequestedOverrideConfigurationChanged(newOverrideConfig);
         updateConfiguration();
     }
 
@@ -924,7 +924,7 @@
             }
         }
         pw.println(prefix + " Configuration=" + getConfiguration());
-        pw.println(prefix + " OverrideConfiguration=" + getOverrideConfiguration());
+        pw.println(prefix + " OverrideConfiguration=" + getRequestedOverrideConfiguration());
         pw.println(prefix + " mLastReportedConfiguration=" + mLastReportedConfiguration);
     }
 
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java
index 048384e..f6871b3 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java
@@ -162,7 +162,8 @@
         assertEquals(WINDOWING_MODE_FULLSCREEN, primarySplitScreen.getWindowingMode());
 
         // Ensure that the override mode is restored to undefined
-        assertEquals(WINDOWING_MODE_UNDEFINED, primarySplitScreen.getOverrideWindowingMode());
+        assertEquals(WINDOWING_MODE_UNDEFINED,
+                primarySplitScreen.getRequestedOverrideWindowingMode());
     }
 
     @Test
@@ -184,7 +185,8 @@
         assertEquals(0, mDefaultDisplay.getIndexOf(primarySplitScreen));
 
         // Ensure that the override mode is restored to what it was (fullscreen)
-        assertEquals(WINDOWING_MODE_FULLSCREEN, primarySplitScreen.getOverrideWindowingMode());
+        assertEquals(WINDOWING_MODE_FULLSCREEN,
+                primarySplitScreen.getRequestedOverrideWindowingMode());
     }
 
     @Test
@@ -193,11 +195,13 @@
                 WINDOWING_MODE_UNDEFINED, ACTIVITY_TYPE_STANDARD, true /* onTop */);
 
         assertEquals(WINDOWING_MODE_FULLSCREEN, primarySplitScreen.getWindowingMode());
-        assertEquals(WINDOWING_MODE_UNDEFINED, primarySplitScreen.getOverrideWindowingMode());
+        assertEquals(WINDOWING_MODE_UNDEFINED,
+                primarySplitScreen.getRequestedOverrideWindowingMode());
 
         mDefaultDisplay.setWindowingMode(WINDOWING_MODE_FREEFORM);
         assertEquals(WINDOWING_MODE_FREEFORM, primarySplitScreen.getWindowingMode());
-        assertEquals(WINDOWING_MODE_UNDEFINED, primarySplitScreen.getOverrideWindowingMode());
+        assertEquals(WINDOWING_MODE_UNDEFINED,
+                primarySplitScreen.getRequestedOverrideWindowingMode());
     }
 
     @Test
@@ -206,11 +210,13 @@
                 WINDOWING_MODE_UNDEFINED, ACTIVITY_TYPE_STANDARD, true /* onTop */);
 
         assertEquals(WINDOWING_MODE_FULLSCREEN, primarySplitScreen.getWindowingMode());
-        assertEquals(WINDOWING_MODE_UNDEFINED, primarySplitScreen.getOverrideWindowingMode());
+        assertEquals(WINDOWING_MODE_UNDEFINED,
+                primarySplitScreen.getRequestedOverrideWindowingMode());
 
         primarySplitScreen.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
         // setting windowing mode should still work even though resolved mode is already fullscreen
-        assertEquals(WINDOWING_MODE_FULLSCREEN, primarySplitScreen.getOverrideWindowingMode());
+        assertEquals(WINDOWING_MODE_FULLSCREEN,
+                primarySplitScreen.getRequestedOverrideWindowingMode());
 
         mDefaultDisplay.setWindowingMode(WINDOWING_MODE_FREEFORM);
         assertEquals(WINDOWING_MODE_FULLSCREEN, primarySplitScreen.getWindowingMode());
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
index 5c918b4..7c43cf3 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
@@ -135,8 +135,8 @@
         final Rect bounds = new Rect(10, 10, 100, 100);
 
         mStarter.updateBounds(task, bounds);
-        assertEquals(bounds, task.getOverrideBounds());
-        assertEquals(new Rect(), task.getStack().getOverrideBounds());
+        assertEquals(bounds, task.getRequestedOverrideBounds());
+        assertEquals(new Rect(), task.getStack().getRequestedOverrideBounds());
 
         // When in a resizeable stack, the stack bounds should be updated as well.
         final TaskRecord task2 = new TaskBuilder(mService.mStackSupervisor)
@@ -151,10 +151,10 @@
 
         // In the case of no animation, the stack and task bounds should be set immediately.
         if (!ANIMATE) {
-            assertEquals(bounds, task2.getStack().getOverrideBounds());
-            assertEquals(bounds, task2.getOverrideBounds());
+            assertEquals(bounds, task2.getStack().getRequestedOverrideBounds());
+            assertEquals(bounds, task2.getRequestedOverrideBounds());
         } else {
-            assertEquals(new Rect(), task2.getOverrideBounds());
+            assertEquals(new Rect(), task2.getRequestedOverrideBounds());
         }
     }
 
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java b/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
index 0ee532d..92b4dbb 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppWindowTokenTests.java
@@ -155,15 +155,15 @@
 
         // Set initial orientation and update.
         mToken.setOrientation(SCREEN_ORIENTATION_LANDSCAPE);
-        mWm.updateOrientationFromAppTokens(mDisplayContent.getOverrideConfiguration(), null,
-                mDisplayContent.getDisplayId());
+        mWm.updateOrientationFromAppTokens(mDisplayContent.getRequestedOverrideConfiguration(),
+                null, mDisplayContent.getDisplayId());
         assertEquals(SCREEN_ORIENTATION_LANDSCAPE, mDisplayContent.getLastOrientation());
         appWindow.mResizeReported = false;
 
         // Update the orientation to perform 180 degree rotation and check that resize was reported.
         mToken.setOrientation(SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
-        mWm.updateOrientationFromAppTokens(mDisplayContent.getOverrideConfiguration(), null,
-                mDisplayContent.getDisplayId());
+        mWm.updateOrientationFromAppTokens(mDisplayContent.getRequestedOverrideConfiguration(),
+                null, mDisplayContent.getDisplayId());
         mWm.mRoot.performSurfacePlacement(false /* recoveringMemory */);
         assertEquals(SCREEN_ORIENTATION_REVERSE_LANDSCAPE, mDisplayContent.getLastOrientation());
         assertTrue(appWindow.mResizeReported);
diff --git a/services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java
index 82a200b..e7f7d21 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ConfigurationContainerTests.java
@@ -27,6 +27,7 @@
 import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
 import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
 import static android.content.res.Configuration.EMPTY;
+import static android.content.res.Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -55,22 +56,22 @@
     public void testConfigurationInit() {
         // Check root container initial config.
         final TestConfigurationContainer root = new TestConfigurationContainer();
-        assertEquals(EMPTY, root.getOverrideConfiguration());
+        assertEquals(EMPTY, root.getRequestedOverrideConfiguration());
         assertEquals(EMPTY, root.getMergedOverrideConfiguration());
         assertEquals(EMPTY, root.getConfiguration());
 
         // Check child initial config.
         final TestConfigurationContainer child1 = root.addChild();
-        assertEquals(EMPTY, child1.getOverrideConfiguration());
+        assertEquals(EMPTY, child1.getRequestedOverrideConfiguration());
         assertEquals(EMPTY, child1.getMergedOverrideConfiguration());
         assertEquals(EMPTY, child1.getConfiguration());
 
         // Check child initial config if root has overrides.
         final Configuration rootOverrideConfig = new Configuration();
         rootOverrideConfig.fontScale = 1.3f;
-        root.onOverrideConfigurationChanged(rootOverrideConfig);
+        root.onRequestedOverrideConfigurationChanged(rootOverrideConfig);
         final TestConfigurationContainer child2 = root.addChild();
-        assertEquals(EMPTY, child2.getOverrideConfiguration());
+        assertEquals(EMPTY, child2.getRequestedOverrideConfiguration());
         assertEquals(rootOverrideConfig, child2.getMergedOverrideConfiguration());
         assertEquals(rootOverrideConfig, child2.getConfiguration());
 
@@ -83,7 +84,7 @@
         rootFullConfig.updateFrom(rootOverrideConfig);
 
         final TestConfigurationContainer child3 = root.addChild();
-        assertEquals(EMPTY, child3.getOverrideConfiguration());
+        assertEquals(EMPTY, child3.getRequestedOverrideConfiguration());
         assertEquals(rootOverrideConfig, child3.getMergedOverrideConfiguration());
         assertEquals(rootFullConfig, child3.getConfiguration());
     }
@@ -94,24 +95,24 @@
         final TestConfigurationContainer root = new TestConfigurationContainer();
         final Configuration rootOverrideConfig = new Configuration();
         rootOverrideConfig.fontScale = 1.3f;
-        root.onOverrideConfigurationChanged(rootOverrideConfig);
+        root.onRequestedOverrideConfigurationChanged(rootOverrideConfig);
 
         // Init child's config.
         final TestConfigurationContainer child = root.addChild();
         final Configuration childOverrideConfig = new Configuration();
         childOverrideConfig.densityDpi = 320;
-        child.onOverrideConfigurationChanged(childOverrideConfig);
+        child.onRequestedOverrideConfigurationChanged(childOverrideConfig);
         final Configuration mergedOverrideConfig = new Configuration(root.getConfiguration());
         mergedOverrideConfig.updateFrom(childOverrideConfig);
 
         // Check configuration update when child is removed from parent.
         root.removeChild(child);
-        assertEquals(childOverrideConfig, child.getOverrideConfiguration());
+        assertEquals(childOverrideConfig, child.getRequestedOverrideConfiguration());
         assertEquals(mergedOverrideConfig, child.getMergedOverrideConfiguration());
         assertEquals(mergedOverrideConfig, child.getConfiguration());
 
         // It may be paranoia... but let's check if parent's config didn't change after removal.
-        assertEquals(rootOverrideConfig, root.getOverrideConfiguration());
+        assertEquals(rootOverrideConfig, root.getRequestedOverrideConfiguration());
         assertEquals(rootOverrideConfig, root.getMergedOverrideConfiguration());
         assertEquals(rootOverrideConfig, root.getConfiguration());
 
@@ -119,13 +120,13 @@
         final TestConfigurationContainer root2 = new TestConfigurationContainer();
         final Configuration rootOverrideConfig2 = new Configuration();
         rootOverrideConfig2.fontScale = 1.1f;
-        root2.onOverrideConfigurationChanged(rootOverrideConfig2);
+        root2.onRequestedOverrideConfigurationChanged(rootOverrideConfig2);
 
         // Check configuration update when child is added to different parent.
         mergedOverrideConfig.setTo(rootOverrideConfig2);
         mergedOverrideConfig.updateFrom(childOverrideConfig);
         root2.addChild(child);
-        assertEquals(childOverrideConfig, child.getOverrideConfiguration());
+        assertEquals(childOverrideConfig, child.getRequestedOverrideConfiguration());
         assertEquals(mergedOverrideConfig, child.getMergedOverrideConfiguration());
         assertEquals(mergedOverrideConfig, child.getConfiguration());
     }
@@ -141,24 +142,24 @@
         final Configuration rootOverrideConfig = new Configuration();
         rootOverrideConfig.fontScale = 1.3f;
         rootOverrideConfig.orientation = SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
-        root.onOverrideConfigurationChanged(rootOverrideConfig);
+        root.onRequestedOverrideConfigurationChanged(rootOverrideConfig);
 
         // Init children.
         final TestConfigurationContainer child1 = root.addChild();
         final Configuration childOverrideConfig1 = new Configuration();
         childOverrideConfig1.densityDpi = 320;
         childOverrideConfig1.orientation = SCREEN_ORIENTATION_LANDSCAPE;
-        child1.onOverrideConfigurationChanged(childOverrideConfig1);
+        child1.onRequestedOverrideConfigurationChanged(childOverrideConfig1);
 
         final TestConfigurationContainer child2 = child1.addChild();
         final Configuration childOverrideConfig2 = new Configuration();
         childOverrideConfig2.screenWidthDp = 150;
         childOverrideConfig2.orientation = SCREEN_ORIENTATION_PORTRAIT;
-        child2.onOverrideConfigurationChanged(childOverrideConfig2);
+        child2.onRequestedOverrideConfigurationChanged(childOverrideConfig2);
 
         // Check configuration on all levels when root override is updated.
         rootOverrideConfig.smallestScreenWidthDp = 200;
-        root.onOverrideConfigurationChanged(rootOverrideConfig);
+        root.onRequestedOverrideConfigurationChanged(rootOverrideConfig);
 
         final Configuration mergedOverrideConfig1 = new Configuration(rootOverrideConfig);
         mergedOverrideConfig1.updateFrom(childOverrideConfig1);
@@ -168,15 +169,15 @@
         mergedOverrideConfig2.updateFrom(childOverrideConfig2);
         final Configuration mergedConfig2 = new Configuration(mergedOverrideConfig2);
 
-        assertEquals(rootOverrideConfig, root.getOverrideConfiguration());
+        assertEquals(rootOverrideConfig, root.getRequestedOverrideConfiguration());
         assertEquals(rootOverrideConfig, root.getMergedOverrideConfiguration());
         assertEquals(rootOverrideConfig, root.getConfiguration());
 
-        assertEquals(childOverrideConfig1, child1.getOverrideConfiguration());
+        assertEquals(childOverrideConfig1, child1.getRequestedOverrideConfiguration());
         assertEquals(mergedOverrideConfig1, child1.getMergedOverrideConfiguration());
         assertEquals(mergedConfig1, child1.getConfiguration());
 
-        assertEquals(childOverrideConfig2, child2.getOverrideConfiguration());
+        assertEquals(childOverrideConfig2, child2.getRequestedOverrideConfiguration());
         assertEquals(mergedOverrideConfig2, child2.getMergedOverrideConfiguration());
         assertEquals(mergedConfig2, child2.getConfiguration());
 
@@ -194,15 +195,15 @@
         mergedConfig2.setTo(mergedConfig1);
         mergedConfig2.updateFrom(mergedOverrideConfig2);
 
-        assertEquals(rootOverrideConfig, root.getOverrideConfiguration());
+        assertEquals(rootOverrideConfig, root.getRequestedOverrideConfiguration());
         assertEquals(rootOverrideConfig, root.getMergedOverrideConfiguration());
         assertEquals(mergedRootConfig, root.getConfiguration());
 
-        assertEquals(childOverrideConfig1, child1.getOverrideConfiguration());
+        assertEquals(childOverrideConfig1, child1.getRequestedOverrideConfiguration());
         assertEquals(mergedOverrideConfig1, child1.getMergedOverrideConfiguration());
         assertEquals(mergedConfig1, child1.getConfiguration());
 
-        assertEquals(childOverrideConfig2, child2.getOverrideConfiguration());
+        assertEquals(childOverrideConfig2, child2.getRequestedOverrideConfiguration());
         assertEquals(mergedOverrideConfig2, child2.getMergedOverrideConfiguration());
         assertEquals(mergedConfig2, child2.getConfiguration());
     }
@@ -274,15 +275,55 @@
         final Configuration config = new Configuration();
         config.windowConfiguration.setWindowingMode(WINDOWING_MODE_FREEFORM);
         config.windowConfiguration.setAppBounds(10, 10, 10, 10);
-        container.onOverrideConfigurationChanged(config);
+        container.onRequestedOverrideConfigurationChanged(config);
         container.registerConfigurationChangeListener(listener);
         // Assert listener got the current config. of the container after it was registered.
         assertEquals(config, listener.mOverrideConfiguration);
         // Assert listener gets changes to override configuration.
-        container.onOverrideConfigurationChanged(EMPTY);
+        container.onRequestedOverrideConfigurationChanged(EMPTY);
         assertEquals(EMPTY, listener.mOverrideConfiguration);
     }
 
+    @Test
+    public void testConfigurationConstraints() {
+        // Init root config.
+        final TestConfigurationContainer root = new TestConfigurationContainer();
+        final Configuration rootOverrideConfig = new Configuration();
+        rootOverrideConfig.smallestScreenWidthDp = 140;
+        root.onRequestedOverrideConfigurationChanged(rootOverrideConfig);
+
+        // Init child with constraint
+        final TestConfigurationChangeListener listener = new TestConfigurationChangeListener();
+        final TestConfigurationContainer child1 = root.addConstraintChild();
+        child1.registerConfigurationChangeListener(listener);
+        final Configuration childOverrideConfig1 = new Configuration();
+        childOverrideConfig1.orientation = SCREEN_ORIENTATION_LANDSCAPE;
+        child1.onRequestedOverrideConfigurationChanged(childOverrideConfig1);
+
+        assertEquals(SMALLEST_SCREEN_WIDTH_DP_UNDEFINED,
+                child1.getRequestedOverrideConfiguration().smallestScreenWidthDp);
+        assertEquals(100, child1.getConfiguration().smallestScreenWidthDp);
+        assertEquals(100, listener.mOverrideConfiguration.smallestScreenWidthDp);
+
+        // Check configuration on all levels when root override is updated.
+        rootOverrideConfig.smallestScreenWidthDp = 80;
+        root.onRequestedOverrideConfigurationChanged(rootOverrideConfig);
+
+        assertEquals(SMALLEST_SCREEN_WIDTH_DP_UNDEFINED,
+                child1.getRequestedOverrideConfiguration().smallestScreenWidthDp);
+        assertEquals(80, child1.getConfiguration().smallestScreenWidthDp);
+        assertEquals(80, listener.mOverrideConfiguration.smallestScreenWidthDp);
+
+        rootOverrideConfig.smallestScreenWidthDp = 180;
+        root.onRequestedOverrideConfigurationChanged(rootOverrideConfig);
+
+        assertEquals(SMALLEST_SCREEN_WIDTH_DP_UNDEFINED,
+                child1.getRequestedOverrideConfiguration().smallestScreenWidthDp);
+        assertEquals(100, child1.getConfiguration().smallestScreenWidthDp);
+        assertEquals(100, child1.getMergedOverrideConfiguration().smallestScreenWidthDp);
+        assertEquals(100, listener.mOverrideConfiguration.smallestScreenWidthDp);
+    }
+
     /**
      * Contains minimal implementation of {@link ConfigurationContainer}'s abstract behavior needed
      * for testing.
@@ -303,6 +344,10 @@
             return addChild(new TestConfigurationContainer());
         }
 
+        TestConfigurationContainer addConstraintChild() {
+            return addChild(new TestConfigurationContainerWithConstraints());
+        }
+
         void removeChild(TestConfigurationContainer child) {
             child.mParent = null;
             child.onParentChanged();
@@ -324,12 +369,35 @@
         }
     }
 
+    /**
+     * Contains minimal implementation of {@link ConfigurationContainer}'s abstract behavior needed
+     * for testing.
+     */
+    private class TestConfigurationContainerWithConstraints
+            extends TestConfigurationContainer {
+
+        @Override
+        public void resolveOverrideConfiguration(Configuration newParentConfig) {
+            // Restrict smallestScreenWidthDp to 100
+            getResolvedOverrideConfiguration().setTo(getRequestedOverrideConfiguration());
+            int smallestScreenWidthDp =
+                    getResolvedOverrideConfiguration().smallestScreenWidthDp
+                            == SMALLEST_SCREEN_WIDTH_DP_UNDEFINED
+                    ? newParentConfig.smallestScreenWidthDp
+                        : getResolvedOverrideConfiguration().smallestScreenWidthDp;
+            if (smallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) {
+                getResolvedOverrideConfiguration().smallestScreenWidthDp =
+                        Math.min(smallestScreenWidthDp, 100);
+            }
+        }
+    }
+
     private static class TestConfigurationChangeListener implements ConfigurationContainerListener {
 
         final Configuration mOverrideConfiguration = new Configuration();
 
         @Override
-        public void onOverrideConfigurationChanged(Configuration overrideConfiguration) {
+        public void onRequestedOverrideConfigurationChanged(Configuration overrideConfiguration) {
             mOverrideConfiguration.setTo(overrideConfiguration);
         }
     }
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());
     }
 
     /**
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskLaunchParamsModifierTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskLaunchParamsModifierTests.java
index 105f826..fe632d4 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskLaunchParamsModifierTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskLaunchParamsModifierTests.java
@@ -949,10 +949,11 @@
 
     @Test
     public void testAdjustBoundsToFitNewDisplay_LargerThanDisplay_RTL() {
-        final Configuration overrideConfig = mRootActivityContainer.getOverrideConfiguration();
+        final Configuration overrideConfig =
+                mRootActivityContainer.getRequestedOverrideConfiguration();
         // Egyptian Arabic is a RTL language.
         overrideConfig.setLayoutDirection(new Locale("ar", "EG"));
-        mRootActivityContainer.onOverrideConfigurationChanged(overrideConfig);
+        mRootActivityContainer.onRequestedOverrideConfigurationChanged(overrideConfig);
 
         final TestActivityDisplay freeformDisplay = createNewActivityDisplay(
                 WINDOWING_MODE_FREEFORM);
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java
index 7592f1c..de3567e 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerControllerTests.java
@@ -93,19 +93,19 @@
 
         controller.setContainer(container);
         assertEquals(controller.mContainer, container);
-        assertEquals(EMPTY, container.getOverrideConfiguration());
+        assertEquals(EMPTY, container.getRequestedOverrideConfiguration());
 
         final Configuration config = new Configuration();
         config.windowConfiguration.setWindowingMode(WINDOWING_MODE_FREEFORM);
         config.windowConfiguration.setAppBounds(10, 10, 10, 10);
 
         // Assert that the config change through the controller is propagated to the container.
-        controller.onOverrideConfigurationChanged(config);
-        assertEquals(config, container.getOverrideConfiguration());
+        controller.onRequestedOverrideConfigurationChanged(config);
+        assertEquals(config, container.getRequestedOverrideConfiguration());
 
         // Assert the container configuration isn't changed after removal from the controller.
         controller.removeContainer();
-        controller.onOverrideConfigurationChanged(EMPTY);
-        assertEquals(config, container.getOverrideConfiguration());
+        controller.onRequestedOverrideConfigurationChanged(EMPTY);
+        assertEquals(config, container.getRequestedOverrideConfiguration());
     }
 }
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
index d4a32cf..60f957f 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
@@ -424,7 +424,7 @@
 
         final TestWindowContainer parent = grandparent.addChildWindow();
         final TestWindowContainer child = parent.addChildWindow();
-        child.onOverrideConfigurationChanged(new Configuration());
+        child.onRequestedOverrideConfigurationChanged(new Configuration());
 
         assertTrue(grandparent.mOnDescendantOverrideCalled);
     }
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java
index 60a8aeb..d9ef10d 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowFrameTests.java
@@ -96,7 +96,7 @@
         }
 
         @Override
-        public void getOverrideBounds(Rect outBounds) {
+        public void getRequestedOverrideBounds(Rect outBounds) {
             outBounds.set(mBounds);
         }
         @Override
@@ -448,9 +448,9 @@
         final int xInset = logicalWidth / 10;
         final int yInset = logicalWidth / 10;
         final Rect cf = new Rect(xInset, yInset, logicalWidth - xInset, logicalHeight - yInset);
-        Configuration config = new Configuration(w.mAppToken.getOverrideConfiguration());
+        Configuration config = new Configuration(w.mAppToken.getRequestedOverrideConfiguration());
         config.windowConfiguration.setBounds(cf);
-        w.mAppToken.onOverrideConfigurationChanged(config);
+        w.mAppToken.onRequestedOverrideConfigurationChanged(config);
         pf.set(0, 0, logicalWidth, logicalHeight);
         task.mFullscreenForTest = true;
         windowFrames.setFrames(pf, pf, pf, cf, cf, pf, cf, mEmptyRect);
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
index b3f56e7..4394f9a 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
@@ -339,7 +339,7 @@
             final int stackId = ++sNextStackId;
             final StackWindowController controller = new StackWindowController(stackId, null,
                     dc.getDisplayId(), true /* onTop */, new Rect(), mWm);
-            controller.onOverrideConfigurationChanged(overrideConfig);
+            controller.onRequestedOverrideConfigurationChanged(overrideConfig);
             return controller;
         }
     }