Introducing ConfigurationContainerListener

Class provides a structured way for window containers on the window
manager side to listener for configuration changes happening in the
window controllers on the activity manager side so things stay in
sync and they don't miss anything.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.ConfigurationContainerTests
Test: go/wm-smoke
Change-Id: I6a6bc98a35bda89b3aaa7a29a9814905f0c3a9ee
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index f70035c..ea2f305 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -187,7 +187,7 @@
 
     private boolean mDisablePreviewScreenshots;
 
-    Task mLastParent;
+    private Task mLastParent;
 
     /**
      * See {@link #canTurnScreenOn()}
@@ -198,8 +198,8 @@
             DisplayContent dc, long inputDispatchingTimeoutNanos, boolean fullscreen,
             boolean showForAllUsers, int targetSdk, int orientation, int rotationAnimationHint,
             int configChanges, boolean launchTaskBehind, boolean alwaysFocusable,
-            AppWindowContainerController controller, Configuration overrideConfig, Rect bounds) {
-        this(service, token, voiceInteraction, dc, fullscreen, overrideConfig, bounds);
+            AppWindowContainerController controller, Rect bounds) {
+        this(service, token, voiceInteraction, dc, fullscreen, bounds);
         setController(controller);
         mInputDispatchingTimeoutNanos = inputDispatchingTimeoutNanos;
         mShowForAllUsers = showForAllUsers;
@@ -216,7 +216,7 @@
     }
 
     AppWindowToken(WindowManagerService service, IApplicationToken token, boolean voiceInteraction,
-            DisplayContent dc, boolean fillsParent, Configuration overrideConfig, Rect bounds) {
+            DisplayContent dc, boolean fillsParent, Rect bounds) {
         super(service, token != null ? token.asBinder() : null, TYPE_APPLICATION, true, dc,
                 false /* ownerCanManageAppTokens */);
         appToken = token;
@@ -224,9 +224,6 @@
         mFillsParent = fillsParent;
         mInputApplicationHandle = new InputApplicationHandle(this);
         mAppAnimator = new AppWindowAnimator(this, service);
-        if (overrideConfig != null) {
-            onOverrideConfigurationChanged(overrideConfig);
-        }
         if (bounds != null) {
             mBounds.set(bounds);
         }